-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ruff and project standardization (#11)
* initial deps * initial project sync (via cruft) * ruff ANN * updated test based on changes in ScreenPyHQ/screenpy#98 * ruff ARG * ruff D * ruff EM * ruff FA * ruff I * ruff TCH * ruff PGH * ruff PIE * ruff PT * ruff RUF * ruff SIM * ruff UP * black formatting * fixing mypy namespace error * adding copyright tests * adding namespace test * fixing name of mocked item since it's being patched at the class level.
- Loading branch information
1 parent
fdfec47
commit 457e850
Showing
25 changed files
with
1,628 additions
and
688 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -144,3 +144,6 @@ dmypy.json | |
|
||
# Pyre type checker | ||
.pyre/ | ||
|
||
# ruff linter | ||
.ruff_cache/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,19 @@ | ||
files: 'screenpy_adapter_allure/.*' | ||
files: '(screenpy_adapter_allure|tests)/.*' | ||
fail_fast: false | ||
repos: | ||
- repo: https://github.com/psf/black | ||
rev: 23.3.0 | ||
hooks: | ||
- id: black | ||
language_version: python3.11 | ||
- repo: https://github.com/timothycrosley/isort | ||
rev: 5.12.0 | ||
hooks: | ||
- id: isort | ||
language_version: python3.11 | ||
- repo: https://github.com/PyCQA/flake8 | ||
rev: 6.0.0 | ||
hooks: | ||
- id: flake8 | ||
language_version: python3.11 | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.3.0 | ||
hooks: | ||
- id: mypy | ||
language_version: python3.11 | ||
additional_dependencies: ["allure-pytest>=2.9.0"] | ||
- repo: local | ||
hooks: | ||
- id: pylint | ||
name: pylint | ||
entry: pylint --max-line-length=88 --disable=bad-continuation --disable=no-self-use --disable=too-few-public-methods --disable=invalid-name --disable=wrong-import-order --disable=import-error --disable=super-init-not-called --disable=duplicate-code --disable=logging-format-interpolation --disable=logging-fstring-interpolation | ||
language: system | ||
types: [python] | ||
- repo: https://github.com/psf/black | ||
rev: 24.1.1 | ||
hooks: | ||
- id: black | ||
language_version: python3.12 | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.2.0 | ||
hooks: | ||
- id: ruff | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v1.8.0 | ||
hooks: | ||
- id: mypy | ||
language_version: python3.12 | ||
additional_dependencies: ["allure-pytest>=2.9.0"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# shortcuts to help manage flipping between branches with different dependencies | ||
sync: | ||
poetry install --extras dev --sync | ||
|
||
update_lock_only: | ||
poetry update --lock | ||
|
||
update: update_lock_only | ||
poetry install --extras dev | ||
|
||
check: | ||
poetry check | ||
|
||
.PHONY: sync update_lock_only update check | ||
|
||
black-check: | ||
black --check . | ||
|
||
black-fix: | ||
black . | ||
|
||
ruff-check: | ||
ruff check . | ||
|
||
ruff-fix: | ||
ruff check . --fix --show-fixes | ||
|
||
mypy: | ||
mypy . | ||
|
||
.PHONY: black-check black-fix ruff-check ruff-fix mypy | ||
|
||
pre-check-in: black-check ruff-check mypy | ||
|
||
pre-check-in-fix: black-fix ruff-fix mypy | ||
|
||
.PHONY: pre-check-in pre-check-in-fix | ||
|
||
# requires poetry-plugin-export | ||
requirements: | ||
poetry export --without-hashes --extras dev -f requirements.txt > requirements.txt | ||
|
||
.PHONY: requirements |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,20 @@ | ||
[mypy] | ||
show_error_codes = True | ||
exclude = (?x)( | ||
setup\.py | ||
| docs/ | ||
) | ||
|
||
[mypy-screenpy_adapter_allure.*] | ||
disallow_untyped_defs = True | ||
|
||
[mypy-tests.*] | ||
disallow_untyped_defs = True | ||
ignore_missing_imports = True | ||
|
||
[mypy-allure.*] | ||
ignore_missing_imports = True | ||
[mypy-allure_commons.*] | ||
ignore_missing_imports = True | ||
[mypy-allure_pytest.*] | ||
ignore_missing_imports = True | ||
ignore_missing_imports = True |
Oops, something went wrong.