Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Drop support for Python 3.7 #50

Merged
merged 3 commits into from
Oct 2, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
PIP_CONSTRAINT: .github/workflows/constraints.txt
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]
python-version: ["3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/[email protected]
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ repos:
- id: pyproject-fmt

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: 'v0.0.291'
rev: 'v0.0.292'
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
Expand Down
908 changes: 457 additions & 451 deletions poetry.lock

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ keywords = [
license = "Apache-2.0"

[tool.poetry.dependencies]
python = ">=3.7.1,<3.12"
python = ">=3.8,<4"
requests = "^2.31.0"
singer-sdk = "~=0.32.0"

Expand All @@ -36,14 +36,17 @@ types-requests = "^2.31.0.6"
tap-circle-ci = 'tap_circle_ci.tap:TapCircleCI.cli'

[tool.ruff]
explicit-preview-rules = false
ignore = [
"ANN101", # missing-type-self
"DJ", # flake8-django
"CPY", # missing-copyright-notice
]
line-length = 88
preview = true
select = ["ALL"]
src = ["tap_pulumi_cloud", "tests"]
target-version = "py37"
target-version = "py38"
unfixable = [
"ERA001", # commented-out-code
]
Expand All @@ -59,6 +62,10 @@ unfixable = [
[tool.ruff.flake8-annotations]
allow-star-arg-any = true

[tool.ruff.format]
# Enable preview style formatting.
preview = true

[tool.ruff.isort]
known-first-party = ["tap_circle_ci"]

Expand Down
2 changes: 1 addition & 1 deletion tap_circle_ci/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def http_headers(self) -> dict:
return headers

def get_url_params(
self,
self, # noqa: PLR6301
context: dict | None, # noqa: ARG002
next_page_token: str | None,
) -> dict[str, Any]:
Expand Down
10 changes: 7 additions & 3 deletions tap_circle_ci/streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class PipelinesStream(CircleCIStream):
schema_filepath = SCHEMAS_DIR / "pipelines.json"

def get_child_context(
self,
self, # noqa: PLR6301
record: dict,
context: dict | None, # noqa: ARG002
) -> dict:
Expand Down Expand Up @@ -49,7 +49,7 @@ class WorkflowsStream(CircleCIStream):
schema_filepath = SCHEMAS_DIR / "workflows.json"

def get_child_context(
self,
self, # noqa: PLR6301
record: dict,
context: dict | None, # noqa: ARG002
) -> dict:
Expand All @@ -66,7 +66,11 @@ class JobsStream(CircleCIStream):
primary_keys: t.ClassVar[list[str]] = ["id"]
schema_filepath = SCHEMAS_DIR / "jobs.json"

def post_process(self, row: dict, context: dict | None = None) -> dict | None:
def post_process(
self, # noqa: PLR6301
row: dict,
context: dict | None = None,
) -> dict | None:
"""Add the Workflow ID to the row."""
if row and context:
row["_workflow_id"] = context["workflow_id"]
Expand Down
6 changes: 3 additions & 3 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# This file can be used to customize tox tests as well as other test frameworks like flake8 and mypy

[tox]
envlist = py38
; envlist = py37, py38, py39
envlist = py311
; envlist = py38, py39, py310, py311
isolated_build = true

[testenv]
Expand All @@ -19,7 +19,7 @@ commands =
[testenv:pytest]
# Run the python tests.
# To execute, run `tox -e pytest`
envlist = py37, py38, py39
envlist = py38, py39, py310, py311
commands =
poetry install -v
poetry run pytest
Expand Down