Skip to content

Commit

Permalink
chore: pre-commit autoupdate
Browse files Browse the repository at this point in the history
updates:
- [github.com/astral-sh/ruff-pre-commit: v0.1.1 → v0.1.3](astral-sh/ruff-pre-commit@v0.1.1...v0.1.3)
  • Loading branch information
pre-commit-ci[bot] authored and edgarrmondragon committed Oct 30, 2023
1 parent 9e8276c commit 8b75555
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 26 deletions.
16 changes: 5 additions & 11 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,25 +43,19 @@ repos:
- id: check-readthedocs

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.1.1
rev: v0.1.3
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix, --show-fixes]
exclude: |
(?x)^(
cookiecutter/.*
)$
- repo: https://github.com/psf/black
rev: 23.10.1
hooks:
- id: black
- id: ruff-format
exclude: |
(?x)^(
cookiecutter/.*|
singer_sdk/helpers/_simpleeval.py|
tests/core/test_simpleeval.py
)$
(?x)^(
cookiecutter/.*
)$
- repo: https://github.com/pycqa/flake8
rev: 6.1.0
Expand Down
28 changes: 16 additions & 12 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,11 @@ build-backend = "poetry.core.masonry.api"
pytest11 = { reference = "singer_sdk:testing.pytest_plugin", extras = ["testing"], type = "console" }

[tool.ruff]
line-length = 88
src = ["samples", "singer_sdk", "tests"]
target-version = "py37"

[tool.ruff.lint]
exclude = [
"cookiecutter/*",
"singer_sdk/helpers/_simpleeval.py",
Expand All @@ -220,8 +225,9 @@ ignore = [
"ANN101", # Missing type annotation for `self` in method
"ANN102", # Missing type annotation for `cls` in class method
"N818", # Exception name should be named with an Error suffix
"COM812", # missing-trailing-comma
"ISC001", # single-line-implicit-string-concatenation
]
line-length = 88
select = [
"F", # Pyflakes
"E", # pycodestyle (error)
Expand Down Expand Up @@ -269,13 +275,11 @@ select = [
"PERF", # perflint
"RUF", # ruff
]
src = ["samples", "singer_sdk", "tests"]
target-version = "py37"
unfixable = [
"ERA", # Don't remove commented out code
]

[tool.ruff.per-file-ignores]
[tool.ruff.lint.per-file-ignores]
"docs/conf.py" = [
"D", # pydocstyle/flake8-docstrings
"I002", # isort: missing-required-import
Expand All @@ -291,32 +295,32 @@ unfixable = [
"singer_sdk/testing/*.py" = ["S101"]
"singer_sdk/testing/templates.py" = ["ANN401"]

[tool.ruff.flake8-annotations]
[tool.ruff.lint.flake8-annotations]
allow-star-arg-any = true
mypy-init-return = true
suppress-dummy-args = true

[tool.ruff.flake8-import-conventions]
[tool.ruff.lint.flake8-import-conventions]
banned-from = ["typing"]

[tool.ruff.flake8-import-conventions.extend-aliases]
[tool.ruff.lint.flake8-import-conventions.extend-aliases]
typing = "t"

[tool.ruff.flake8-pytest-style]
[tool.ruff.lint.flake8-pytest-style]
fixture-parentheses = false
parametrize-names-type = "csv"

[tool.ruff.isort]
[tool.ruff.lint.isort]
known-first-party = ["singer_sdk", "samples", "tests"]
required-imports = ["from __future__ import annotations"]

[tool.ruff.pep8-naming]
[tool.ruff.lint.pep8-naming]
classmethod-decorators = [
"singer_sdk.cli.plugin_cli",
]

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "google"

[tool.ruff.pylint]
[tool.ruff.lint.pylint]
max-args = 9
4 changes: 1 addition & 3 deletions samples/sample_tap_hostile/hostile_streams.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,7 @@ class HostilePropertyNamesStream(Stream):

@staticmethod
def get_random_lowercase_string():
return "".join(
random.choice(string.ascii_lowercase) for _ in range(10) # noqa: S311
)
return "".join(random.choice(string.ascii_lowercase) for _ in range(10)) # noqa: S311

def get_records(
self,
Expand Down

0 comments on commit 8b75555

Please sign in to comment.