-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Broaden appropriate flake8-pyi rules to check non-stub code too #6297
Conversation
Of the rules that flake8-pyi enforces for .pyi type stubs, many of them equally make sense to check in normal runtime code with type annotations. Broaden these rules to check all files: PYI013 ellipsis-in-non-empty-class-body PYI016 duplicate-union-member PYI018 unused-private-type-var PYI019 custom-type-var-return-type PYI024 collections-named-tuple PYI025 unaliased-collections-abc-set-import PYI030 unnecessary-literal-union PYI032 any-eq-ne-annotation PYI034 non-self-return-type PYI036 bad-exit-annotation PYI041 redundant-numeric-union PYI042 snake-case-type-alias PYI043 t-suffixed-type-alias PYI045 iter-method-return-iterable PYI046 unused-private-protocol PYI047 unused-private-type-alias PYI049 unused-private-typed-dict PYI050 no-return-argument-annotation-in-stub (Python ≥ 3.11) PYI051 redundant-literal-union PYI056 unsupported-method-call-on-all The other rules are stub-specific and remain enabled only in .pyi files. PYI001 unprefixed-type-param PYI002 complex-if-statement-in-stub PYI003 unrecognized-version-info-check PYI004 patch-version-comparison PYI005 wrong-tuple-length-version-comparison PYI006 bad-version-info-comparison PYI007 unrecognized-platform-check PYI008 unrecognized-platform-name PYI009 pass-statement-stub-body PYI010 non-empty-stub-body PYI011 typed-argument-default-in-stub PYI012 pass-in-class-body PYI014 argument-default-in-stub PYI015 assignment-default-in-stub PYI017 complex-assignment-in-stub PYI020 quoted-annotation-in-stub PYI021 docstring-in-stub PYI026 type-alias-without-annotation (could make sense to broaden, but gives many false positives on runtime code as currently implemented) PYI029 str-or-repr-defined-in-stub PYI033 type-comment-in-stub PYI035 unassigned-special-variable-in-stub PYI044 future-annotations-in-stub PYI048 stub-body-multiple-statements PYI052 unannotated-assignment-in-stub PYI053 string-or-bytes-too-long PYI054 numeric-literal-too-long Signed-off-by: Anders Kaseorg <[email protected]>
This looks great! I've been wanting this to happen but someone had to go through and do the hard work of auditing the rules for appropriateness, thank you for taking that on. I may rename the rules that are stub-only to have a consistent |
PR Check ResultsEcosystemℹ️ ecosystem check detected changes. (+89, -0, 0 error(s)) airflow (+78, -0)
+ airflow/cli/commands/task_command.py:736:9: PYI034 `__enter__` methods in classes like `LoggerMutationHelper` usually return `self` at runtime + airflow/hooks/subprocess.py:28:20: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + airflow/metrics/base_stats_logger.py:34:15: PYI041 Use `float` instead of `int | float` + airflow/metrics/base_stats_logger.py:45:15: PYI041 Use `float` instead of `int | float` + airflow/metrics/base_stats_logger.py:56:15: PYI041 Use `float` instead of `int | float` + airflow/metrics/datadog_logger.py:98:16: PYI041 Use `float` instead of `int | float` + airflow/metrics/otel_logger.py:227:16: PYI041 Use `float` instead of `int | float` + airflow/metrics/protocols.py:105:9: PYI034 `__enter__` methods in classes like `Timer` usually return `self` at runtime + airflow/metrics/statsd_logger.py:112:16: PYI041 Use `float` instead of `int | float` + airflow/metrics/validators.py:44:5: PYI013 [*] Non-empty class body must not contain `...` + airflow/models/param.py:190:29: PYI032 [*] Prefer `object` to `Any` for the second parameter to `__eq__` + airflow/models/xcom.py:716:9: PYI034 `__iter__` methods in classes like `_LazyXComAccessIterator` usually return `self` at runtime + airflow/models/xcom.py:752:29: PYI032 [*] Prefer `object` to `Any` for the second parameter to `__eq__` + airflow/models/xcom_arg.py:253:29: PYI032 [*] Prefer `object` to `Any` for the second parameter to `__eq__` + airflow/models/xcom_arg.py:95:9: PYI034 `__new__` methods in classes like `XComArg` usually return `self` at runtime + airflow/operators/python.py:520:25: PYI041 Use `float` instead of `int | float` + airflow/providers/amazon/aws/hooks/batch_client.py:263:16: PYI041 Use `float` instead of `int | float` + airflow/providers/amazon/aws/hooks/batch_client.py:292:56: PYI041 Use `float` instead of `int | float` + airflow/providers/amazon/aws/hooks/batch_client.py:315:57: PYI041 Use `float` instead of `int | float` + airflow/providers/amazon/aws/hooks/batch_client.py:512:27: PYI041 Use `float` instead of `int | float` + airflow/providers/amazon/aws/hooks/batch_client.py:512:47: PYI041 Use `float` instead of `int | float` + airflow/providers/amazon/aws/hooks/batch_client.py:512:72: PYI041 Use `float` instead of `int | float` + airflow/providers/amazon/aws/hooks/batch_client.py:540:22: PYI041 Use `float` instead of `int | float` + airflow/providers/amazon/aws/hooks/batch_waiters.py:193:16: PYI041 Use `float` instead of `int | float` + airflow/providers/amazon/aws/hooks/glue.py:73:22: PYI041 Use `float` instead of `int | float` + airflow/providers/amazon/aws/hooks/glue.py:77:28: PYI041 Use `float` instead of `int | float` + airflow/providers/amazon/aws/hooks/sagemaker.py:57:12: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + airflow/providers/amazon/aws/operators/glue.py:105:28: PYI041 Use `float` instead of `int | float` + airflow/providers/amazon/aws/operators/glue.py:94:22: PYI041 Use `float` instead of `int | float` + airflow/providers/amazon/aws/transfers/sql_to_s3.py:45:15: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + airflow/providers/amazon/aws/triggers/glue.py:42:28: PYI041 Use `float` instead of `int | float` + airflow/providers/amazon/aws/utils/waiter.py:37:16: PYI041 Use `float` instead of `int | float` + airflow/providers/databricks/hooks/databricks_base.py:646:9: PYI034 `__new__` methods in classes like `BearerAuth` usually return `self` at runtime + airflow/providers/datadog/hooks/datadog.py:75:20: PYI041 Use `float` instead of `int | float` + airflow/providers/ftp/hooks/ftp.py:53:34: PYI036 The first argument in `__exit__` should be annotated with `object` or `type[BaseException] | None` + airflow/providers/ftp/hooks/ftp.py:53:48: PYI036 The second argument in `__exit__` should be annotated with `object` or `BaseException | None` + airflow/providers/ftp/hooks/ftp.py:53:61: PYI036 The third argument in `__exit__` should be annotated with `object` or `types.TracebackType | None` + airflow/providers/google/cloud/triggers/bigquery.py:393:21: PYI041 Use `float` instead of `int | float` + airflow/providers/imap/hooks/imap.py:58:9: PYI034 `__enter__` methods in classes like `ImapHook` usually return `self` at runtime + airflow/providers/microsoft/azure/operators/container_instances.py:215:32: PYI016 [*] Duplicate union member `Volume` + airflow/providers/microsoft/azure/operators/container_instances.py:216:43: PYI016 [*] Duplicate union member `VolumeMount` + airflow/providers/microsoft/azure/operators/container_instances.py:48:10: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + airflow/providers/microsoft/azure/transfers/sftp_to_wasb.py:36:12: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + airflow/providers/qubole/operators/qubole_check.py:165:21: PYI041 Use `float` instead of `int | float` + airflow/providers/qubole/operators/qubole_check.py:166:20: PYI041 Use `float` instead of `int | float` + airflow/providers/smtp/hooks/smtp.py:62:9: PYI034 `__enter__` methods in classes like `SmtpHook` usually return `self` at runtime + airflow/providers/ssh/hooks/ssh.py:367:9: PYI034 `__enter__` methods in classes like `SSHHook` usually return `self` at runtime + airflow/providers/tableau/hooks/tableau.py:101:34: PYI036 The first argument in `__exit__` should be annotated with `object` or `type[BaseException] | None` + airflow/providers/tableau/hooks/tableau.py:101:48: PYI036 The second argument in `__exit__` should be annotated with `object` or `BaseException | None` + airflow/providers/tableau/hooks/tableau.py:101:61: PYI036 The third argument in `__exit__` should be annotated with `object` or `types.TracebackType | None` + airflow/providers_manager.py:194:24: PYI030 Multiple literal members in a union. Use a single literal, e.g. `Literal["source", "package"]` + airflow/ti_deps/deps/base_ti_dep.py:48:29: PYI032 [*] Prefer `object` to `Any` for the second parameter to `__eq__` + airflow/timetables/_cron.py:73:29: PYI032 [*] Prefer `object` to `Any` for the second parameter to `__eq__` + airflow/timetables/interval.py:187:29: PYI032 [*] Prefer `object` to `Any` for the second parameter to `__eq__` + airflow/timetables/simple.py:43:29: PYI032 [*] Prefer `object` to `Any` for the second parameter to `__eq__` + airflow/utils/context.py:228:29: PYI032 [*] Prefer `object` to `Any` for the second parameter to `__eq__` + airflow/utils/context.py:233:29: PYI032 [*] Prefer `object` to `Any` for the second parameter to `__ne__` + airflow/utils/serve_logs.py:137:18: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + airflow/utils/task_group.py:336:9: PYI034 `__enter__` methods in classes like `TaskGroup` usually return `self` at runtime + airflow/utils/timezone.py:241:26: PYI041 Use `float` instead of `int | float` + dev/provider_packages/prepare_provider_packages.py:610:15: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + tests/always/test_connection.py:36:19: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + tests/decorators/test_python.py:292:17: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + tests/operators/test_python.py:182:17: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + tests/providers/apache/hive/hooks/test_hive.py:444:25: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + tests/providers/apache/hive/hooks/test_hive.py:523:27: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + tests/providers/apache/hive/hooks/test_hive.py:525:21: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + tests/providers/apache/hive/hooks/test_hive.py:527:25: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + tests/providers/apache/hive/hooks/test_hive.py:545:27: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + tests/providers/apache/hive/hooks/test_hive.py:547:21: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + tests/providers/google/cloud/hooks/test_kms.py:30:12: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + tests/providers/microsoft/azure/operators/test_azure_container_instances.py:38:21: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + tests/providers/microsoft/azure/operators/test_azure_container_instances.py:41:17: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + tests/providers/microsoft/azure/operators/test_azure_container_instances.py:44:19: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + tests/providers/microsoft/azure/operators/test_azure_container_instances.py:56:21: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + tests/providers/microsoft/azure/operators/test_azure_container_instances.py:59:17: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + tests/providers/microsoft/azure/operators/test_azure_container_instances.py:62:19: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` + tests/sensors/test_python.py:59:17: PYI024 Use `typing.NamedTuple` instead of `collections.namedtuple` bokeh (+10, -0)
+ src/bokeh/client/session.py:318:9: PYI034 `__enter__` methods in classes like `ClientSession` usually return `self` at runtime + src/bokeh/client/session.py:324:34: PYI036 The first argument in `__exit__` should be annotated with `object` or `type[BaseException] | None` + src/bokeh/client/session.py:324:50: PYI036 The second argument in `__exit__` should be annotated with `object` or `BaseException | None` + src/bokeh/client/session.py:324:70: PYI036 The third argument in `__exit__` should be annotated with `object` or `types.TracebackType | None` + src/bokeh/embed/util.py:219:29: PYI032 [*] Prefer `object` to `Any` for the second parameter to `__eq__` + src/bokeh/io/export.py:529:9: PYI034 `__enter__` methods in classes like `_TempFile` usually return `self` at runtime + src/bokeh/io/export.py:532:29: PYI036 The first argument in `__exit__` should be annotated with `object` or `type[BaseException] | None` + src/bokeh/io/export.py:532:41: PYI036 The second argument in `__exit__` should be annotated with `object` or `BaseException | None` + src/bokeh/io/export.py:532:50: PYI036 The third argument in `__exit__` should be annotated with `object` or `types.TracebackType | None` + src/bokeh/model/model.py:90:9: PYI034 `__new__` methods in classes like `Model` usually return `self` at runtime zulip (+1, -0)
+ zerver/lib/push_notifications.py:102:29: PYI032 [*] Prefer `object` to `Any` for the second parameter to `__eq__`
BenchmarkLinux
Windows
|
Would any of PYI003 - PYI006 make sense to include? |
PYI003 unrecognized-version-info-check and PY004 patch-version-comparison target version comparisons that aren’t specially recognized by type checkers but seem fine to allow in runtime code: MIN_VERSION = (3, 10)
if sys.version_info < MIN_VERSION: # PYI003
exit(1)
if sys.version_info < (3, 10, 0): # PYI004
exit(1) Broadening PYI005 wrong-tuple-length-version-comparison and PYI006 bad-version-info-comparison could make sense. I had skipped these four rules together because they’re handled by the same function. I note that these rules are currently restricted to the context of an |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is awesome! Thanks a lot for doing this :)
We may want to update the documentation to reflect that these rules will be checked against Python files as well but that can happen in another PR.
Sweet! Thank you! |
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://beta.ruff.rs/docs) ([source](https://togithub.com/astral-sh/ruff), [changelog](https://togithub.com/astral-sh/ruff/releases)) | `0.0.282` -> `0.0.283` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/ruff/0.0.283?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/ruff/0.0.283?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/ruff/0.0.282/0.0.283?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/ruff/0.0.282/0.0.283?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>astral-sh/ruff (ruff)</summary> ### [`v0.0.283`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.283) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.282...v0.0.283) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Breaking Changes - Assume Python 3.8 instead of 3.10 for target version by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6397](https://togithub.com/astral-sh/ruff/pull/6397) ##### Rules - \[`flake8-pyi`] `PYI019`: Detects if a type variable is used instead of `Self` in return annotations by [@​qdegraaf](https://togithub.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/6204](https://togithub.com/astral-sh/ruff/pull/6204) - \[`flake8-pyi`] `PYI051`: Detects unions of `Literal` types by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6215](https://togithub.com/astral-sh/ruff/pull/6215) - \[`flake8-pyi`] `PYI055`: Detects unions of `type`s by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6316](https://togithub.com/astral-sh/ruff/pull/6316) - \[`pylint`] `E1300`: Detects invalid string format characters by [@​silvanocerza](https://togithub.com/silvanocerza) in [https://github.com/astral-sh/ruff/pull/6171](https://togithub.com/astral-sh/ruff/pull/6171) - \[`pyupgrade`] `UP040`: Upgrades type alias annotations to use PEP-695 syntax by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6289](https://togithub.com/astral-sh/ruff/pull/6289) ##### Rule Changes - \[`flake8-boolean-trap`] `FBT003`: Add `is_` and `is_not` to excluded functions by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6307](https://togithub.com/astral-sh/ruff/pull/6307) - \[`flake8-logging-format`] Allow capitalized names for logger candidate heuristic match by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6356](https://togithub.com/astral-sh/ruff/pull/6356) - \[`flake8-pyi`] Applicable rules are now checked non-stub code by [@​andersk](https://togithub.com/andersk) in [https://github.com/astral-sh/ruff/pull/6297](https://togithub.com/astral-sh/ruff/pull/6297) - `PYI013`: [`ellipsis-in-non-empty-class-body`](https://beta.ruff.rs/docs/rules/ellipsis-in-non-empty-class-body) - `PYI016`: [`duplicate-union-member`](https://beta.ruff.rs/docs/rules/duplicate-union-member) - `PYI018`: [`unused-private-type-var`](https://beta.ruff.rs/docs/rules/unused-private-type-var) - `PYI019`: [`custom-type-var-return-type`](https://beta.ruff.rs/docs/rules/custom-type-var-return-type) - `PYI024`: [`collections-named-tuple`](https://beta.ruff.rs/docs/rules/collections-named-tuple) - `PYI025`: [`unaliased-collections-abc-set-import`](https://beta.ruff.rs/docs/rules/unaliased-collections-abc-set-import) - `PYI030`: [`unnecessary-literal-union`](https://beta.ruff.rs/docs/rules/unnecessary-literal-union) - `PYI032`: [`any-eq-ne-annotation`](https://beta.ruff.rs/docs/rules/any-eq-ne-annotation) - `PYI034`: [`non-self-return-type`](https://beta.ruff.rs/docs/rules/non-self-return-type) - `PYI036`: [`bad-exit-annotation`](https://beta.ruff.rs/docs/rules/bad-exit-annotation) - `PYI041`: [`redundant-numeric-union`](https://beta.ruff.rs/docs/rules/redundant-numeric-union) - `PYI042`: [`snake-case-type-alias`](https://beta.ruff.rs/docs/rules/snake-case-type-alias) - `PYI043`: [`t-suffixed-type-alias`](https://beta.ruff.rs/docs/rules/t-suffixed-type-alias) - `PYI045`: [`iter-method-return-iterable`](https://beta.ruff.rs/docs/rules/iter-method-return-iterable) - `PYI046`: [`unused-private-protocol`](https://beta.ruff.rs/docs/rules/unused-private-protocol) - `PYI047`: [`unused-private-type-alias`](https://beta.ruff.rs/docs/rules/unused-private-type-alias) - `PYI049`: [`unused-private-typed-dict`](https://beta.ruff.rs/docs/rules/unused-private-typed-dict) - `PYI050`: [`no-return-argument-annotation-in-stub`](https://beta.ruff.rs/docs/rules/no-return-argument-annotation-in-stub) (Python ≥ 3.11) - `PYI051`: [`redundant-literal-union`](https://beta.ruff.rs/docs/rules/redundant-literal-union) - `PYI056`: [`unsupported-method-call-on-all`](https://beta.ruff.rs/docs/rules/unsupported-method-call-on-all) - \[`flake8-pyi`] `PYI027` is being replaced by `PYI022` / `UP035` by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6354](https://togithub.com/astral-sh/ruff/pull/6354) - \[`pydocstyle`] `D103`: Don't require docstrings in `.pyi` files by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6239](https://togithub.com/astral-sh/ruff/pull/6239) - \[`pydocstyle`] `D203`: Ignore same-line docstrings for lines-before and lines-after rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6344](https://togithub.com/astral-sh/ruff/pull/6344) - \[`pylint`] `PLE0605`: Allow generic tuple and list calls in `__all__` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6247](https://togithub.com/astral-sh/ruff/pull/6247) - \[`pylint`] `PLR0124`: Add detection of comparisons with built-in calls by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6324](https://togithub.com/astral-sh/ruff/pull/6324) - \[`pyupgrade`] `UP032`: Add support for `await` expressions in f-strings by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6304](https://togithub.com/astral-sh/ruff/pull/6304) - \[`pyupgrade`] `UP032`: Add support for implicitly concatenated strings by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6263](https://togithub.com/astral-sh/ruff/pull/6263) - \[`pyupgrade`] `UP032`: Add support for repeated format fields by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6266](https://togithub.com/astral-sh/ruff/pull/6266) - \[`ruff`] `RUF012`: Permit `ClassVar` and `Final` without subscript by [@​bluetech](https://togithub.com/bluetech) in [https://github.com/astral-sh/ruff/pull/6273](https://togithub.com/astral-sh/ruff/pull/6273) ##### Bug Fixes - \[`flake8-bugbear`] `B006`: Respect `typing_extensions` imports of `Annotated` by [@​PIG208](https://togithub.com/PIG208) in [https://github.com/astral-sh/ruff/pull/6361](https://togithub.com/astral-sh/ruff/pull/6361) - \[`flake8-pyi`] `PYI019`: Fix panic with positional-only arguments by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6350](https://togithub.com/astral-sh/ruff/pull/6350) - \[`flake8-use-pathlib`] Avoid raising `PTH206` with `maxsplit` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6283](https://togithub.com/astral-sh/ruff/pull/6283) - \[`flake8`] `F841`: Update autofix to not remove Jupyer magic expressions by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6141](https://togithub.com/astral-sh/ruff/pull/6141) - \[`pycodestyle`] `E721`: Include comparisons to builtin types by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6325](https://togithub.com/astral-sh/ruff/pull/6325) - \[`pycodestyle`] `E721`: Match left-hand side `types()` call in `types-comparison` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6326](https://togithub.com/astral-sh/ruff/pull/6326) - \[`pyupgrade`] `UP031`: Avoid auto-fixing if there are comments within the right-hand side by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6364](https://togithub.com/astral-sh/ruff/pull/6364) - \[`pyupgrade`] `UP032`: Avoid auto-fixing if comments are present around format call arguments by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6342](https://togithub.com/astral-sh/ruff/pull/6342) - \[`pyupgrade`] `UP032`: Improve invalid expression check by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6308](https://togithub.com/astral-sh/ruff/pull/6308) - Avoid attempting to fix `.format(...)` calls with too-few-arguments by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6401](https://togithub.com/astral-sh/ruff/pull/6401) - Fix bug where `.gitignore` files in parent directories were incorrectly used by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6368](https://togithub.com/astral-sh/ruff/pull/6368) - Fix duplicate violations raised on nested bitwise or `Union` expressions by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6399](https://togithub.com/astral-sh/ruff/pull/6399) ##### Playground - Add a simple tooltip to the sidebar by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6295](https://togithub.com/astral-sh/ruff/pull/6295) - Add an icon for FIR by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6292](https://togithub.com/astral-sh/ruff/pull/6292) - Increase icon opacity on-hover by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6291](https://togithub.com/astral-sh/ruff/pull/6291) - Tweak background on theme button by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6290](https://togithub.com/astral-sh/ruff/pull/6290) ##### Other Changes - Improve handling of violations around Jupyter magic expressions by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5552](https://togithub.com/astral-sh/ruff/pull/5552) - Reduce memory usage by boxing type params and arguments fields on the class definition node by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6275](https://togithub.com/astral-sh/ruff/pull/6275) - Upgrade Rust to 1.71 by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6323](https://togithub.com/astral-sh/ruff/pull/6323) #### New Contributors - [@​silvanocerza](https://togithub.com/silvanocerza) made their first contribution in [https://github.com/astral-sh/ruff/pull/6171](https://togithub.com/astral-sh/ruff/pull/6171) - [@​PIG208](https://togithub.com/PIG208) made their first contribution in [https://github.com/astral-sh/ruff/pull/6361](https://togithub.com/astral-sh/ruff/pull/6361) **Full Changelog**: astral-sh/ruff@v0.0.282...v0.0.283 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/jankatins/pr-workflow-example). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4yNy4xIiwidXBkYXRlZEluVmVyIjoiMzYuMjcuMSIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==-->
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://beta.ruff.rs/docs) ([source](https://togithub.com/astral-sh/ruff), [changelog](https://togithub.com/astral-sh/ruff/releases)) | `^0.0.281` -> `^0.0.284` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/ruff/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/ruff/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/ruff/0.0.281/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/ruff/0.0.281/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>astral-sh/ruff (ruff)</summary> ### [`v0.0.284`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.284) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.283...v0.0.284) #### What's Changed This release fixes a few bugs, notably the previous release announced a breaking change where the default target Python version changed from 3.10 to 3.8 but the change was not applied. Thanks to [@​rco-ableton](https://togithub.com/rco-ableton) for fixing this in [https://github.com/astral-sh/ruff/pull/6444](https://togithub.com/astral-sh/ruff/pull/6444) ##### Bug Fixes - Do not trigger `S108` if path is inside `tempfile.*` call by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6416](https://togithub.com/astral-sh/ruff/pull/6416) - Do not allow on zero tab width by [@​tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/6429](https://togithub.com/astral-sh/ruff/pull/6429) - Fix false-positive in submodule resolution by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6435](https://togithub.com/astral-sh/ruff/pull/6435) #### New Contributors - [@​rco-ableton](https://togithub.com/rco-ableton) made their first contribution in [https://github.com/astral-sh/ruff/pull/6444](https://togithub.com/astral-sh/ruff/pull/6444) **Full Changelog**: astral-sh/ruff@v0.0.283...v0.0.284 ### [`v0.0.283`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.283) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.282...v0.0.283) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Breaking Changes - Assume Python 3.8 instead of 3.10 for target version by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6397](https://togithub.com/astral-sh/ruff/pull/6397) ##### Rules - \[`flake8-pyi`] `PYI019`: Detects if a type variable is used instead of `Self` in return annotations by [@​qdegraaf](https://togithub.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/6204](https://togithub.com/astral-sh/ruff/pull/6204) - \[`flake8-pyi`] `PYI051`: Detects unions of `Literal` types by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6215](https://togithub.com/astral-sh/ruff/pull/6215) - \[`flake8-pyi`] `PYI055`: Detects unions of `type`s by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6316](https://togithub.com/astral-sh/ruff/pull/6316) - \[`pylint`] `E1300`: Detects invalid string format characters by [@​silvanocerza](https://togithub.com/silvanocerza) in [https://github.com/astral-sh/ruff/pull/6171](https://togithub.com/astral-sh/ruff/pull/6171) - \[`pyupgrade`] `UP040`: Upgrades type alias annotations to use PEP-695 syntax by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6289](https://togithub.com/astral-sh/ruff/pull/6289) ##### Rule Changes - \[`flake8-boolean-trap`] `FBT003`: Add `is_` and `is_not` to excluded functions by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6307](https://togithub.com/astral-sh/ruff/pull/6307) - \[`flake8-logging-format`] Allow capitalized names for logger candidate heuristic match by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6356](https://togithub.com/astral-sh/ruff/pull/6356) - \[`flake8-pyi`] Applicable rules are now checked non-stub code by [@​andersk](https://togithub.com/andersk) in [https://github.com/astral-sh/ruff/pull/6297](https://togithub.com/astral-sh/ruff/pull/6297) - `PYI013`: [`ellipsis-in-non-empty-class-body`](https://beta.ruff.rs/docs/rules/ellipsis-in-non-empty-class-body) - `PYI016`: [`duplicate-union-member`](https://beta.ruff.rs/docs/rules/duplicate-union-member) - `PYI018`: [`unused-private-type-var`](https://beta.ruff.rs/docs/rules/unused-private-type-var) - `PYI019`: [`custom-type-var-return-type`](https://beta.ruff.rs/docs/rules/custom-type-var-return-type) - `PYI024`: [`collections-named-tuple`](https://beta.ruff.rs/docs/rules/collections-named-tuple) - `PYI025`: [`unaliased-collections-abc-set-import`](https://beta.ruff.rs/docs/rules/unaliased-collections-abc-set-import) - `PYI030`: [`unnecessary-literal-union`](https://beta.ruff.rs/docs/rules/unnecessary-literal-union) - `PYI032`: [`any-eq-ne-annotation`](https://beta.ruff.rs/docs/rules/any-eq-ne-annotation) - `PYI034`: [`non-self-return-type`](https://beta.ruff.rs/docs/rules/non-self-return-type) - `PYI036`: [`bad-exit-annotation`](https://beta.ruff.rs/docs/rules/bad-exit-annotation) - `PYI041`: [`redundant-numeric-union`](https://beta.ruff.rs/docs/rules/redundant-numeric-union) - `PYI042`: [`snake-case-type-alias`](https://beta.ruff.rs/docs/rules/snake-case-type-alias) - `PYI043`: [`t-suffixed-type-alias`](https://beta.ruff.rs/docs/rules/t-suffixed-type-alias) - `PYI045`: [`iter-method-return-iterable`](https://beta.ruff.rs/docs/rules/iter-method-return-iterable) - `PYI046`: [`unused-private-protocol`](https://beta.ruff.rs/docs/rules/unused-private-protocol) - `PYI047`: [`unused-private-type-alias`](https://beta.ruff.rs/docs/rules/unused-private-type-alias) - `PYI049`: [`unused-private-typed-dict`](https://beta.ruff.rs/docs/rules/unused-private-typed-dict) - `PYI050`: [`no-return-argument-annotation-in-stub`](https://beta.ruff.rs/docs/rules/no-return-argument-annotation-in-stub) (Python ≥ 3.11) - `PYI051`: [`redundant-literal-union`](https://beta.ruff.rs/docs/rules/redundant-literal-union) - `PYI056`: [`unsupported-method-call-on-all`](https://beta.ruff.rs/docs/rules/unsupported-method-call-on-all) - \[`flake8-pyi`] `PYI027` is being replaced by `PYI022` / `UP035` by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6354](https://togithub.com/astral-sh/ruff/pull/6354) - \[`pydocstyle`] `D103`: Don't require docstrings in `.pyi` files by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6239](https://togithub.com/astral-sh/ruff/pull/6239) - \[`pydocstyle`] `D203`: Ignore same-line docstrings for lines-before and lines-after rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6344](https://togithub.com/astral-sh/ruff/pull/6344) - \[`pylint`] `PLE0605`: Allow generic tuple and list calls in `__all__` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6247](https://togithub.com/astral-sh/ruff/pull/6247) - \[`pylint`] `PLR0124`: Add detection of comparisons with built-in calls by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6324](https://togithub.com/astral-sh/ruff/pull/6324) - \[`pyupgrade`] `UP032`: Add support for `await` expressions in f-strings by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6304](https://togithub.com/astral-sh/ruff/pull/6304) - \[`pyupgrade`] `UP032`: Add support for implicitly concatenated strings by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6263](https://togithub.com/astral-sh/ruff/pull/6263) - \[`pyupgrade`] `UP032`: Add support for repeated format fields by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6266](https://togithub.com/astral-sh/ruff/pull/6266) - \[`ruff`] `RUF012`: Permit `ClassVar` and `Final` without subscript by [@​bluetech](https://togithub.com/bluetech) in [https://github.com/astral-sh/ruff/pull/6273](https://togithub.com/astral-sh/ruff/pull/6273) ##### Bug Fixes - \[`flake8-bugbear`] `B006`: Respect `typing_extensions` imports of `Annotated` by [@​PIG208](https://togithub.com/PIG208) in [https://github.com/astral-sh/ruff/pull/6361](https://togithub.com/astral-sh/ruff/pull/6361) - \[`flake8-pyi`] `PYI019`: Fix panic with positional-only arguments by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6350](https://togithub.com/astral-sh/ruff/pull/6350) - \[`flake8-use-pathlib`] Avoid raising `PTH206` with `maxsplit` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6283](https://togithub.com/astral-sh/ruff/pull/6283) - \[`flake8`] `F841`: Update autofix to not remove Jupyer magic expressions by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6141](https://togithub.com/astral-sh/ruff/pull/6141) - \[`pycodestyle`] `E721`: Include comparisons to builtin types by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6325](https://togithub.com/astral-sh/ruff/pull/6325) - \[`pycodestyle`] `E721`: Match left-hand side `types()` call in `types-comparison` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6326](https://togithub.com/astral-sh/ruff/pull/6326) - \[`pyupgrade`] `UP031`: Avoid auto-fixing if there are comments within the right-hand side by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6364](https://togithub.com/astral-sh/ruff/pull/6364) - \[`pyupgrade`] `UP032`: Avoid auto-fixing if comments are present around format call arguments by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6342](https://togithub.com/astral-sh/ruff/pull/6342) - \[`pyupgrade`] `UP032`: Improve invalid expression check by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6308](https://togithub.com/astral-sh/ruff/pull/6308) - Avoid attempting to fix `.format(...)` calls with too-few-arguments by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6401](https://togithub.com/astral-sh/ruff/pull/6401) - Fix bug where `.gitignore` files in parent directories were incorrectly used by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6368](https://togithub.com/astral-sh/ruff/pull/6368) - Fix duplicate violations raised on nested bitwise or `Union` expressions by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6399](https://togithub.com/astral-sh/ruff/pull/6399) ##### Playground - Add a simple tooltip to the sidebar by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6295](https://togithub.com/astral-sh/ruff/pull/6295) - Add an icon for FIR by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6292](https://togithub.com/astral-sh/ruff/pull/6292) - Increase icon opacity on-hover by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6291](https://togithub.com/astral-sh/ruff/pull/6291) - Tweak background on theme button by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6290](https://togithub.com/astral-sh/ruff/pull/6290) ##### Other Changes - Improve handling of violations around Jupyter magic expressions by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5552](https://togithub.com/astral-sh/ruff/pull/5552) - Reduce memory usage by boxing type params and arguments fields on the class definition node by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6275](https://togithub.com/astral-sh/ruff/pull/6275) - Upgrade Rust to 1.71 by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6323](https://togithub.com/astral-sh/ruff/pull/6323) #### New Contributors - [@​silvanocerza](https://togithub.com/silvanocerza) made their first contribution in [https://github.com/astral-sh/ruff/pull/6171](https://togithub.com/astral-sh/ruff/pull/6171) - [@​PIG208](https://togithub.com/PIG208) made their first contribution in [https://github.com/astral-sh/ruff/pull/6361](https://togithub.com/astral-sh/ruff/pull/6361) **Full Changelog**: astral-sh/ruff@v0.0.282...v0.0.283 ### [`v0.0.282`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.282) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.281...v0.0.282) <!-- Release notes generated using configuration in .github/release.yml at v0.0.282 --> #### What's Changed ##### Bug Fixes - Reset model state when exiting deferred visitors by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6208](https://togithub.com/astral-sh/ruff/pull/6208) - Skip trivia when searching for named exception by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6218](https://togithub.com/astral-sh/ruff/pull/6218) - Avoid PERF401 false positive on list access in loop by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6220](https://togithub.com/astral-sh/ruff/pull/6220) - Avoid detecting continuations at non-start-of-line by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6219](https://togithub.com/astral-sh/ruff/pull/6219) - Revert "Expand scope of `quoted-annotation` rule ([#​5766](https://togithub.com/astral-sh/ruff/issues/5766))" by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6237](https://togithub.com/astral-sh/ruff/pull/6237) #### New Contributors - [@​klistwan](https://togithub.com/klistwan) made their first contribution in [https://github.com/astral-sh/ruff/pull/6146](https://togithub.com/astral-sh/ruff/pull/6146) **Full Changelog**: astral-sh/ruff@v0.0.281...v0.0.282 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR is behind base branch, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/ixm-one/pytest-cmake-presets). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi4yNy4xIiwidXBkYXRlZEluVmVyIjoiMzYuNDAuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://beta.ruff.rs/docs) ([source](https://togithub.com/astral-sh/ruff), [changelog](https://togithub.com/astral-sh/ruff/releases)) | `==0.0.282` -> `==0.0.284` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/ruff/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/ruff/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/ruff/0.0.282/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/ruff/0.0.282/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>astral-sh/ruff (ruff)</summary> ### [`v0.0.284`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.284) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.283...v0.0.284) #### What's Changed This release fixes a few bugs, notably the previous release announced a breaking change where the default target Python version changed from 3.10 to 3.8 but the change was not applied. Thanks to [@​rco-ableton](https://togithub.com/rco-ableton) for fixing this in [https://github.com/astral-sh/ruff/pull/6444](https://togithub.com/astral-sh/ruff/pull/6444) ##### Bug Fixes - Do not trigger `S108` if path is inside `tempfile.*` call by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6416](https://togithub.com/astral-sh/ruff/pull/6416) - Do not allow on zero tab width by [@​tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/6429](https://togithub.com/astral-sh/ruff/pull/6429) - Fix false-positive in submodule resolution by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6435](https://togithub.com/astral-sh/ruff/pull/6435) #### New Contributors - [@​rco-ableton](https://togithub.com/rco-ableton) made their first contribution in [https://github.com/astral-sh/ruff/pull/6444](https://togithub.com/astral-sh/ruff/pull/6444) **Full Changelog**: astral-sh/ruff@v0.0.283...v0.0.284 ### [`v0.0.283`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.283) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.282...v0.0.283) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Breaking Changes - Assume Python 3.8 instead of 3.10 for target version by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6397](https://togithub.com/astral-sh/ruff/pull/6397) ##### Rules - \[`flake8-pyi`] `PYI019`: Detects if a type variable is used instead of `Self` in return annotations by [@​qdegraaf](https://togithub.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/6204](https://togithub.com/astral-sh/ruff/pull/6204) - \[`flake8-pyi`] `PYI051`: Detects unions of `Literal` types by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6215](https://togithub.com/astral-sh/ruff/pull/6215) - \[`flake8-pyi`] `PYI055`: Detects unions of `type`s by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6316](https://togithub.com/astral-sh/ruff/pull/6316) - \[`pylint`] `E1300`: Detects invalid string format characters by [@​silvanocerza](https://togithub.com/silvanocerza) in [https://github.com/astral-sh/ruff/pull/6171](https://togithub.com/astral-sh/ruff/pull/6171) - \[`pyupgrade`] `UP040`: Upgrades type alias annotations to use PEP-695 syntax by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6289](https://togithub.com/astral-sh/ruff/pull/6289) ##### Rule Changes - \[`flake8-boolean-trap`] `FBT003`: Add `is_` and `is_not` to excluded functions by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6307](https://togithub.com/astral-sh/ruff/pull/6307) - \[`flake8-logging-format`] Allow capitalized names for logger candidate heuristic match by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6356](https://togithub.com/astral-sh/ruff/pull/6356) - \[`flake8-pyi`] Applicable rules are now checked non-stub code by [@​andersk](https://togithub.com/andersk) in [https://github.com/astral-sh/ruff/pull/6297](https://togithub.com/astral-sh/ruff/pull/6297) - `PYI013`: [`ellipsis-in-non-empty-class-body`](https://beta.ruff.rs/docs/rules/ellipsis-in-non-empty-class-body) - `PYI016`: [`duplicate-union-member`](https://beta.ruff.rs/docs/rules/duplicate-union-member) - `PYI018`: [`unused-private-type-var`](https://beta.ruff.rs/docs/rules/unused-private-type-var) - `PYI019`: [`custom-type-var-return-type`](https://beta.ruff.rs/docs/rules/custom-type-var-return-type) - `PYI024`: [`collections-named-tuple`](https://beta.ruff.rs/docs/rules/collections-named-tuple) - `PYI025`: [`unaliased-collections-abc-set-import`](https://beta.ruff.rs/docs/rules/unaliased-collections-abc-set-import) - `PYI030`: [`unnecessary-literal-union`](https://beta.ruff.rs/docs/rules/unnecessary-literal-union) - `PYI032`: [`any-eq-ne-annotation`](https://beta.ruff.rs/docs/rules/any-eq-ne-annotation) - `PYI034`: [`non-self-return-type`](https://beta.ruff.rs/docs/rules/non-self-return-type) - `PYI036`: [`bad-exit-annotation`](https://beta.ruff.rs/docs/rules/bad-exit-annotation) - `PYI041`: [`redundant-numeric-union`](https://beta.ruff.rs/docs/rules/redundant-numeric-union) - `PYI042`: [`snake-case-type-alias`](https://beta.ruff.rs/docs/rules/snake-case-type-alias) - `PYI043`: [`t-suffixed-type-alias`](https://beta.ruff.rs/docs/rules/t-suffixed-type-alias) - `PYI045`: [`iter-method-return-iterable`](https://beta.ruff.rs/docs/rules/iter-method-return-iterable) - `PYI046`: [`unused-private-protocol`](https://beta.ruff.rs/docs/rules/unused-private-protocol) - `PYI047`: [`unused-private-type-alias`](https://beta.ruff.rs/docs/rules/unused-private-type-alias) - `PYI049`: [`unused-private-typed-dict`](https://beta.ruff.rs/docs/rules/unused-private-typed-dict) - `PYI050`: [`no-return-argument-annotation-in-stub`](https://beta.ruff.rs/docs/rules/no-return-argument-annotation-in-stub) (Python ≥ 3.11) - `PYI051`: [`redundant-literal-union`](https://beta.ruff.rs/docs/rules/redundant-literal-union) - `PYI056`: [`unsupported-method-call-on-all`](https://beta.ruff.rs/docs/rules/unsupported-method-call-on-all) - \[`flake8-pyi`] `PYI027` is being replaced by `PYI022` / `UP035` by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6354](https://togithub.com/astral-sh/ruff/pull/6354) - \[`pydocstyle`] `D103`: Don't require docstrings in `.pyi` files by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6239](https://togithub.com/astral-sh/ruff/pull/6239) - \[`pydocstyle`] `D203`: Ignore same-line docstrings for lines-before and lines-after rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6344](https://togithub.com/astral-sh/ruff/pull/6344) - \[`pylint`] `PLE0605`: Allow generic tuple and list calls in `__all__` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6247](https://togithub.com/astral-sh/ruff/pull/6247) - \[`pylint`] `PLR0124`: Add detection of comparisons with built-in calls by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6324](https://togithub.com/astral-sh/ruff/pull/6324) - \[`pyupgrade`] `UP032`: Add support for `await` expressions in f-strings by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6304](https://togithub.com/astral-sh/ruff/pull/6304) - \[`pyupgrade`] `UP032`: Add support for implicitly concatenated strings by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6263](https://togithub.com/astral-sh/ruff/pull/6263) - \[`pyupgrade`] `UP032`: Add support for repeated format fields by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6266](https://togithub.com/astral-sh/ruff/pull/6266) - \[`ruff`] `RUF012`: Permit `ClassVar` and `Final` without subscript by [@​bluetech](https://togithub.com/bluetech) in [https://github.com/astral-sh/ruff/pull/6273](https://togithub.com/astral-sh/ruff/pull/6273) ##### Bug Fixes - \[`flake8-bugbear`] `B006`: Respect `typing_extensions` imports of `Annotated` by [@​PIG208](https://togithub.com/PIG208) in [https://github.com/astral-sh/ruff/pull/6361](https://togithub.com/astral-sh/ruff/pull/6361) - \[`flake8-pyi`] `PYI019`: Fix panic with positional-only arguments by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6350](https://togithub.com/astral-sh/ruff/pull/6350) - \[`flake8-use-pathlib`] Avoid raising `PTH206` with `maxsplit` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6283](https://togithub.com/astral-sh/ruff/pull/6283) - \[`flake8`] `F841`: Update autofix to not remove Jupyer magic expressions by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6141](https://togithub.com/astral-sh/ruff/pull/6141) - \[`pycodestyle`] `E721`: Include comparisons to builtin types by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6325](https://togithub.com/astral-sh/ruff/pull/6325) - \[`pycodestyle`] `E721`: Match left-hand side `types()` call in `types-comparison` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6326](https://togithub.com/astral-sh/ruff/pull/6326) - \[`pyupgrade`] `UP031`: Avoid auto-fixing if there are comments within the right-hand side by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6364](https://togithub.com/astral-sh/ruff/pull/6364) - \[`pyupgrade`] `UP032`: Avoid auto-fixing if comments are present around format call arguments by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6342](https://togithub.com/astral-sh/ruff/pull/6342) - \[`pyupgrade`] `UP032`: Improve invalid expression check by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6308](https://togithub.com/astral-sh/ruff/pull/6308) - Avoid attempting to fix `.format(...)` calls with too-few-arguments by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6401](https://togithub.com/astral-sh/ruff/pull/6401) - Fix bug where `.gitignore` files in parent directories were incorrectly used by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6368](https://togithub.com/astral-sh/ruff/pull/6368) - Fix duplicate violations raised on nested bitwise or `Union` expressions by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6399](https://togithub.com/astral-sh/ruff/pull/6399) ##### Playground - Add a simple tooltip to the sidebar by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6295](https://togithub.com/astral-sh/ruff/pull/6295) - Add an icon for FIR by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6292](https://togithub.com/astral-sh/ruff/pull/6292) - Increase icon opacity on-hover by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6291](https://togithub.com/astral-sh/ruff/pull/6291) - Tweak background on theme button by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6290](https://togithub.com/astral-sh/ruff/pull/6290) ##### Other Changes - Improve handling of violations around Jupyter magic expressions by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5552](https://togithub.com/astral-sh/ruff/pull/5552) - Reduce memory usage by boxing type params and arguments fields on the class definition node by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6275](https://togithub.com/astral-sh/ruff/pull/6275) - Upgrade Rust to 1.71 by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6323](https://togithub.com/astral-sh/ruff/pull/6323) #### New Contributors - [@​silvanocerza](https://togithub.com/silvanocerza) made their first contribution in [https://github.com/astral-sh/ruff/pull/6171](https://togithub.com/astral-sh/ruff/pull/6171) - [@​PIG208](https://togithub.com/PIG208) made their first contribution in [https://github.com/astral-sh/ruff/pull/6361](https://togithub.com/astral-sh/ruff/pull/6361) **Full Changelog**: astral-sh/ruff@v0.0.282...v0.0.283 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/allenporter/pyrainbird). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi40MC4zIiwidXBkYXRlZEluVmVyIjoiMzYuNDAuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [ruff](https://beta.ruff.rs/docs) ([source](https://togithub.com/astral-sh/ruff), [changelog](https://togithub.com/astral-sh/ruff/releases)) | `==0.0.282` -> `==0.0.284` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/ruff/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/ruff/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/ruff/0.0.282/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/ruff/0.0.282/0.0.284?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>astral-sh/ruff (ruff)</summary> ### [`v0.0.284`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.284) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.283...v0.0.284) #### What's Changed This release fixes a few bugs, notably the previous release announced a breaking change where the default target Python version changed from 3.10 to 3.8 but the change was not applied. Thanks to [@​rco-ableton](https://togithub.com/rco-ableton) for fixing this in [https://github.com/astral-sh/ruff/pull/6444](https://togithub.com/astral-sh/ruff/pull/6444) ##### Bug Fixes - Do not trigger `S108` if path is inside `tempfile.*` call by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6416](https://togithub.com/astral-sh/ruff/pull/6416) - Do not allow on zero tab width by [@​tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/6429](https://togithub.com/astral-sh/ruff/pull/6429) - Fix false-positive in submodule resolution by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6435](https://togithub.com/astral-sh/ruff/pull/6435) #### New Contributors - [@​rco-ableton](https://togithub.com/rco-ableton) made their first contribution in [https://github.com/astral-sh/ruff/pull/6444](https://togithub.com/astral-sh/ruff/pull/6444) **Full Changelog**: astral-sh/ruff@v0.0.283...v0.0.284 ### [`v0.0.283`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.283) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.282...v0.0.283) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Breaking Changes - Assume Python 3.8 instead of 3.10 for target version by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6397](https://togithub.com/astral-sh/ruff/pull/6397) ##### Rules - \[`flake8-pyi`] `PYI019`: Detects if a type variable is used instead of `Self` in return annotations by [@​qdegraaf](https://togithub.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/6204](https://togithub.com/astral-sh/ruff/pull/6204) - \[`flake8-pyi`] `PYI051`: Detects unions of `Literal` types by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6215](https://togithub.com/astral-sh/ruff/pull/6215) - \[`flake8-pyi`] `PYI055`: Detects unions of `type`s by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6316](https://togithub.com/astral-sh/ruff/pull/6316) - \[`pylint`] `E1300`: Detects invalid string format characters by [@​silvanocerza](https://togithub.com/silvanocerza) in [https://github.com/astral-sh/ruff/pull/6171](https://togithub.com/astral-sh/ruff/pull/6171) - \[`pyupgrade`] `UP040`: Upgrades type alias annotations to use PEP-695 syntax by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6289](https://togithub.com/astral-sh/ruff/pull/6289) ##### Rule Changes - \[`flake8-boolean-trap`] `FBT003`: Add `is_` and `is_not` to excluded functions by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6307](https://togithub.com/astral-sh/ruff/pull/6307) - \[`flake8-logging-format`] Allow capitalized names for logger candidate heuristic match by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6356](https://togithub.com/astral-sh/ruff/pull/6356) - \[`flake8-pyi`] Applicable rules are now checked non-stub code by [@​andersk](https://togithub.com/andersk) in [https://github.com/astral-sh/ruff/pull/6297](https://togithub.com/astral-sh/ruff/pull/6297) - `PYI013`: [`ellipsis-in-non-empty-class-body`](https://beta.ruff.rs/docs/rules/ellipsis-in-non-empty-class-body) - `PYI016`: [`duplicate-union-member`](https://beta.ruff.rs/docs/rules/duplicate-union-member) - `PYI018`: [`unused-private-type-var`](https://beta.ruff.rs/docs/rules/unused-private-type-var) - `PYI019`: [`custom-type-var-return-type`](https://beta.ruff.rs/docs/rules/custom-type-var-return-type) - `PYI024`: [`collections-named-tuple`](https://beta.ruff.rs/docs/rules/collections-named-tuple) - `PYI025`: [`unaliased-collections-abc-set-import`](https://beta.ruff.rs/docs/rules/unaliased-collections-abc-set-import) - `PYI030`: [`unnecessary-literal-union`](https://beta.ruff.rs/docs/rules/unnecessary-literal-union) - `PYI032`: [`any-eq-ne-annotation`](https://beta.ruff.rs/docs/rules/any-eq-ne-annotation) - `PYI034`: [`non-self-return-type`](https://beta.ruff.rs/docs/rules/non-self-return-type) - `PYI036`: [`bad-exit-annotation`](https://beta.ruff.rs/docs/rules/bad-exit-annotation) - `PYI041`: [`redundant-numeric-union`](https://beta.ruff.rs/docs/rules/redundant-numeric-union) - `PYI042`: [`snake-case-type-alias`](https://beta.ruff.rs/docs/rules/snake-case-type-alias) - `PYI043`: [`t-suffixed-type-alias`](https://beta.ruff.rs/docs/rules/t-suffixed-type-alias) - `PYI045`: [`iter-method-return-iterable`](https://beta.ruff.rs/docs/rules/iter-method-return-iterable) - `PYI046`: [`unused-private-protocol`](https://beta.ruff.rs/docs/rules/unused-private-protocol) - `PYI047`: [`unused-private-type-alias`](https://beta.ruff.rs/docs/rules/unused-private-type-alias) - `PYI049`: [`unused-private-typed-dict`](https://beta.ruff.rs/docs/rules/unused-private-typed-dict) - `PYI050`: [`no-return-argument-annotation-in-stub`](https://beta.ruff.rs/docs/rules/no-return-argument-annotation-in-stub) (Python ≥ 3.11) - `PYI051`: [`redundant-literal-union`](https://beta.ruff.rs/docs/rules/redundant-literal-union) - `PYI056`: [`unsupported-method-call-on-all`](https://beta.ruff.rs/docs/rules/unsupported-method-call-on-all) - \[`flake8-pyi`] `PYI027` is being replaced by `PYI022` / `UP035` by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6354](https://togithub.com/astral-sh/ruff/pull/6354) - \[`pydocstyle`] `D103`: Don't require docstrings in `.pyi` files by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6239](https://togithub.com/astral-sh/ruff/pull/6239) - \[`pydocstyle`] `D203`: Ignore same-line docstrings for lines-before and lines-after rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6344](https://togithub.com/astral-sh/ruff/pull/6344) - \[`pylint`] `PLE0605`: Allow generic tuple and list calls in `__all__` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6247](https://togithub.com/astral-sh/ruff/pull/6247) - \[`pylint`] `PLR0124`: Add detection of comparisons with built-in calls by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6324](https://togithub.com/astral-sh/ruff/pull/6324) - \[`pyupgrade`] `UP032`: Add support for `await` expressions in f-strings by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6304](https://togithub.com/astral-sh/ruff/pull/6304) - \[`pyupgrade`] `UP032`: Add support for implicitly concatenated strings by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6263](https://togithub.com/astral-sh/ruff/pull/6263) - \[`pyupgrade`] `UP032`: Add support for repeated format fields by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6266](https://togithub.com/astral-sh/ruff/pull/6266) - \[`ruff`] `RUF012`: Permit `ClassVar` and `Final` without subscript by [@​bluetech](https://togithub.com/bluetech) in [https://github.com/astral-sh/ruff/pull/6273](https://togithub.com/astral-sh/ruff/pull/6273) ##### Bug Fixes - \[`flake8-bugbear`] `B006`: Respect `typing_extensions` imports of `Annotated` by [@​PIG208](https://togithub.com/PIG208) in [https://github.com/astral-sh/ruff/pull/6361](https://togithub.com/astral-sh/ruff/pull/6361) - \[`flake8-pyi`] `PYI019`: Fix panic with positional-only arguments by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6350](https://togithub.com/astral-sh/ruff/pull/6350) - \[`flake8-use-pathlib`] Avoid raising `PTH206` with `maxsplit` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6283](https://togithub.com/astral-sh/ruff/pull/6283) - \[`flake8`] `F841`: Update autofix to not remove Jupyer magic expressions by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6141](https://togithub.com/astral-sh/ruff/pull/6141) - \[`pycodestyle`] `E721`: Include comparisons to builtin types by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6325](https://togithub.com/astral-sh/ruff/pull/6325) - \[`pycodestyle`] `E721`: Match left-hand side `types()` call in `types-comparison` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6326](https://togithub.com/astral-sh/ruff/pull/6326) - \[`pyupgrade`] `UP031`: Avoid auto-fixing if there are comments within the right-hand side by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6364](https://togithub.com/astral-sh/ruff/pull/6364) - \[`pyupgrade`] `UP032`: Avoid auto-fixing if comments are present around format call arguments by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6342](https://togithub.com/astral-sh/ruff/pull/6342) - \[`pyupgrade`] `UP032`: Improve invalid expression check by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6308](https://togithub.com/astral-sh/ruff/pull/6308) - Avoid attempting to fix `.format(...)` calls with too-few-arguments by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6401](https://togithub.com/astral-sh/ruff/pull/6401) - Fix bug where `.gitignore` files in parent directories were incorrectly used by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6368](https://togithub.com/astral-sh/ruff/pull/6368) - Fix duplicate violations raised on nested bitwise or `Union` expressions by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6399](https://togithub.com/astral-sh/ruff/pull/6399) ##### Playground - Add a simple tooltip to the sidebar by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6295](https://togithub.com/astral-sh/ruff/pull/6295) - Add an icon for FIR by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6292](https://togithub.com/astral-sh/ruff/pull/6292) - Increase icon opacity on-hover by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6291](https://togithub.com/astral-sh/ruff/pull/6291) - Tweak background on theme button by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6290](https://togithub.com/astral-sh/ruff/pull/6290) ##### Other Changes - Improve handling of violations around Jupyter magic expressions by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5552](https://togithub.com/astral-sh/ruff/pull/5552) - Reduce memory usage by boxing type params and arguments fields on the class definition node by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6275](https://togithub.com/astral-sh/ruff/pull/6275) - Upgrade Rust to 1.71 by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6323](https://togithub.com/astral-sh/ruff/pull/6323) #### New Contributors - [@​silvanocerza](https://togithub.com/silvanocerza) made their first contribution in [https://github.com/astral-sh/ruff/pull/6171](https://togithub.com/astral-sh/ruff/pull/6171) - [@​PIG208](https://togithub.com/PIG208) made their first contribution in [https://github.com/astral-sh/ruff/pull/6361](https://togithub.com/astral-sh/ruff/pull/6361) **Full Changelog**: astral-sh/ruff@v0.0.282...v0.0.283 </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/allenporter/flux-local). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi40MC4zIiwidXBkYXRlZEluVmVyIjoiMzYuNDAuMyIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
[![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [docs/MarkDown](https://togithub.com/Python-Markdown/markdown) ([changelog](https://togithub.com/Python-Markdown/markdown/blob/master/docs/change_log/index.md)) | `==3.3.7` -> `==3.4.4` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/docs%2fMarkDown/3.4.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/docs%2fMarkDown/3.4.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/docs%2fMarkDown/3.3.7/3.4.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/docs%2fMarkDown/3.3.7/3.4.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [docs/mkdocs](https://togithub.com/mkdocs/mkdocs) ([changelog](https://www.mkdocs.org/about/release-notes/)) | `==1.4.3` -> `==1.5.2` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/docs%2fmkdocs/1.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/docs%2fmkdocs/1.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/docs%2fmkdocs/1.4.3/1.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/docs%2fmkdocs/1.4.3/1.5.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [docs/mkdocs-macros-plugin](https://togithub.com/fralau/mkdocs_macros_plugin) | `==1.0.2` -> `==1.0.4` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/docs%2fmkdocs-macros-plugin/1.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/docs%2fmkdocs-macros-plugin/1.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/docs%2fmkdocs-macros-plugin/1.0.2/1.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/docs%2fmkdocs-macros-plugin/1.0.2/1.0.4?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [docs/mkdocs-material](https://togithub.com/squidfunk/mkdocs-material) | `==9.1.18` -> `==9.1.21` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/docs%2fmkdocs-material/9.1.21?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/docs%2fmkdocs-material/9.1.21?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/docs%2fmkdocs-material/9.1.18/9.1.21?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/docs%2fmkdocs-material/9.1.18/9.1.21?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [misc-lint/ruff](https://beta.ruff.rs/docs) ([source](https://togithub.com/astral-sh/ruff), [changelog](https://togithub.com/astral-sh/ruff/releases)) | `==0.0.280` -> `==0.0.283` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/misc-lint%2fruff/0.0.283?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/misc-lint%2fruff/0.0.283?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/misc-lint%2fruff/0.0.280/0.0.283?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/misc-lint%2fruff/0.0.280/0.0.283?slim=true)](https://docs.renovatebot.com/merge-confidence/) | | [typecheck/types-Markdown](https://togithub.com/python/typeshed) ([changelog](https://togithub.com/typeshed-internal/stub_uploader/blob/main/data/changelogs/Markdown.md)) | `==3.4.2.9` -> `==3.4.2.10` | [![age](https://developer.mend.io/api/mc/badges/age/pypi/typecheck%2ftypes-Markdown/3.4.2.10?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/pypi/typecheck%2ftypes-Markdown/3.4.2.10?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/pypi/typecheck%2ftypes-Markdown/3.4.2.9/3.4.2.10?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/pypi/typecheck%2ftypes-Markdown/3.4.2.9/3.4.2.10?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>Python-Markdown/markdown (docs/MarkDown)</summary> ### [`v3.4.4`](https://togithub.com/Python-Markdown/markdown/compare/3.4.3...3.4.4) [Compare Source](https://togithub.com/Python-Markdown/markdown/compare/3.4.3...3.4.4) ### [`v3.4.3`](https://togithub.com/Python-Markdown/markdown/compare/3.4.2...3.4.3) [Compare Source](https://togithub.com/Python-Markdown/markdown/compare/3.4.2...3.4.3) ### [`v3.4.2`](https://togithub.com/Python-Markdown/markdown/compare/3.4.1...3.4.2) [Compare Source](https://togithub.com/Python-Markdown/markdown/compare/3.4.1...3.4.2) ### [`v3.4.1`](https://togithub.com/Python-Markdown/markdown/compare/3.4...3.4.1) [Compare Source](https://togithub.com/Python-Markdown/markdown/compare/3.4...3.4.1) ### [`v3.4`](https://togithub.com/Python-Markdown/markdown/compare/3.3.7...3.4) [Compare Source](https://togithub.com/Python-Markdown/markdown/compare/3.3.7...3.4) </details> <details> <summary>mkdocs/mkdocs (docs/mkdocs)</summary> ### [`v1.5.2`](https://togithub.com/mkdocs/mkdocs/releases/tag/1.5.2) [Compare Source](https://togithub.com/mkdocs/mkdocs/compare/1.5.1...1.5.2) - Bugfix (regression in 1.5.0): Restore functionality of `--no-livereload`. ([#​3320](https://togithub.com/mkdocs/mkdocs/issues/3320)) - Bugfix (regression in 1.5.0): The new page title detection would sometimes be unable to drop anchorlinks - fix that. ([#​3325](https://togithub.com/mkdocs/mkdocs/issues/3325)) - Partly bring back pre-1.5 API: `extra_javascript` items will once again be mostly strings, and only sometimes `ExtraStringValue` (when the extra `script` functionality is used). Plugins should be free to append strings to `config.extra_javascript`, but when reading the values, they must still make sure to read it as `str(value)` in case it is an `ExtraScriptValue` item. For querying the attributes such as `.type` you need to check `isinstance` first. Static type checking will guide you in that. ([#​3324](https://togithub.com/mkdocs/mkdocs/issues/3324)) See [commit log](https://togithub.com/mkdocs/mkdocs/compare/1.5.1...1.5.2). ### [`v1.5.1`](https://togithub.com/mkdocs/mkdocs/releases/tag/1.5.1) [Compare Source](https://togithub.com/mkdocs/mkdocs/compare/1.5.0...1.5.1) - Bugfix (regression in 1.5.0): Make it possible to treat `ExtraScriptValue` as a path. This lets some plugins still work despite the breaking change. - Bugfix (regression in 1.5.0): Prevent errors for special setups that have 3 conflicting files, such as `index.html`, `index.md` *and* `README.md` ([#​3314](https://togithub.com/mkdocs/mkdocs/issues/3314)) See [commit log](https://togithub.com/mkdocs/mkdocs/compare/1.5.0...1.5.1). ### [`v1.5.0`](https://togithub.com/mkdocs/mkdocs/releases/tag/1.5.0) [Compare Source](https://togithub.com/mkdocs/mkdocs/compare/1.4.3...1.5.0) **New: MkDocs now accepts donations.** Please consider supporting the current maintainer at my new GitHub sponsorship page. MkDocs has been a totally free project since the beginning and wasn't accepting funds. MkDocs will remain free of paywalls, but now you can show your support with donations (one-time and/or recurring). [**Donate for MkDocs - @​oprypin sponsors page**](https://togithub.com/sponsors/oprypin) And please also consider these other individuals who have been contributing to the ecosystem for a long time and check out their donations pages: [@​facelessuser](https://togithub.com/sponsors/facelessuser) [@​pawamoy](https://togithub.com/sponsors/pawamoy) [@​Ultrabug](https://togithub.com/sponsors/Ultrabug) *** ##### Release 1.5.0 #### New command `mkdocs get-deps` This command guesses the Python dependencies that a MkDocs site requires in order to build. It simply prints the PyPI packages that need to be installed. In the terminal it can be combined directly with an installation command as follows: ```bash pip install $(mkdocs get-deps) ``` The idea is that right after running this command, you can directly follow it up with `mkdocs build` and it will almost always "just work", without needing to think which dependencies to install. The way it works is by scanning `mkdocs.yml` for `themes:`, `plugins:`, `markdown_extensions:` items and doing a reverse lookup based on a large list of known projects (catalog, see below). Of course, you're welcome to use a "virtualenv" with such a command. Also note that for environments that require stability (for example CI) directly installing deps in this way is not a very reliable approach as it precludes dependency pinning. The command allows overriding which config file is used (instead of `mkdocs.yml` in the current directory) as well as which catalog of projects is used (instead of downloading it from the default location). See [`mkdocs get-deps --help`](https://www.mkdocs.org/user-guide/cli/#mkdocs-get-deps). Context: [#​3205](https://togithub.com/mkdocs/mkdocs/issues/3205) #### MkDocs has an official catalog of plugins Check out <https://github.com/mkdocs/catalog> and add all your general-purpose plugins, themes and extensions there, so that they can be looked up through `mkdocs get-deps`. This was renamed from "best-of-mkdocs" and received significant updates. In addition to `pip` installation commands, the page now shows the config boilerplate needed to add a plugin. #### Expanded validation of links ##### Validated links in Markdown > As you may know, within Markdown, MkDocs really only recognizes **relative** links that lead to another physical `*.md` document (or media file). This is a good convention to follow because then the source pages are also freely browsable without MkDocs, for example on GitHub. MkDocs knows that in the output it should turn those `*.md` links into `*.html` as appropriate, and it would also always tell you if such a link doesn't actually lead to an existing file. However, the checks for links were really loose and had many concessions. For example, links that started with `/` ("absolute") and links that *ended* with `/` were left as is and no warning was shown, which allowed such very fragile links to sneak into site sources: links that happen to work right now but get no validation and links that confusingly need an extra level of `..` with `use_directory_urls` enabled. Now, in addition to validating relative links, MkDocs will print `INFO` messages for unrecognized types of links (including absolute links). They look like this: ```text INFO - Doc file 'example.md' contains an absolute link '/foo/bar/', it was left as is. Did you mean 'foo/bar.md'? ``` If you don't want any changes, not even the `INFO` messages, and wish to revert to the silence from MkDocs 1.4, add the following configs to `mkdocs.yml` (**not** recommended): ```yaml validation: absolute_links: ignore unrecognized_links: ignore ``` If, on the opposite end, you want these to print `WARNING` messages and cause `mkdocs build --strict` to fail, you are recommended to configure these to `warn` instead. See [**documentation**](https://www.mkdocs.org/user-guide/configuration/#validation) for actual recommended settings and more details. Context: [#​3283](https://togithub.com/mkdocs/mkdocs/issues/3283) ##### Validated links in the nav Links to documents in the [`nav` configuration](https://www.mkdocs.org/user-guide/configuration/#nav) now also have configurable validation, though with no changes to the defaults. You are welcomed to turn on validation for files that were forgotten and excluded from the nav. Example: ```yaml validation: nav: omitted_files: warn absolute_links: warn ``` This can make the following message appear with the `WARNING` level (as opposed to `INFO` as the only option previously), thus being caught by `mkdocs --strict`: ```text INFO - The following pages exist in the docs directory, but are not included in the "nav" configuration: ... ``` See [**documentation**](https://www.mkdocs.org/user-guide/configuration/#validation). Context: [#​3283](https://togithub.com/mkdocs/mkdocs/issues/3283), [#​1755](https://togithub.com/mkdocs/mkdocs/issues/1755) ##### Mark docs as intentionally "not in nav" There is a new config `not_in_nav`. With it, you can mark particular patterns of files as exempt from the above `omitted_files` warning type; no messages will be printed for them anymore. (As a corollary, setting this config to `*` is the same as ignoring `omitted_files` altogether.) This is useful if you generally like these warnings about files that were forgotten from the nav, but still have some pages that you knowingly excluded from the nav and just want to build and copy them. The `not_in_nav` config is a set of gitignore-like patterns. See the next section for an explanation of another such config. See [**documentation**](https://www.mkdocs.org/user-guide/configuration/#not_in_nav). Context: [#​3224](https://togithub.com/mkdocs/mkdocs/issues/3224), [#​1888](https://togithub.com/mkdocs/mkdocs/issues/1888) #### Excluded doc files There is a new config `exclude_docs` that tells MkDocs to ignore certain files under `docs_dir` and *not* copy them to the built `site` as part of the build. Historically MkDocs would always ignore file names starting with a dot, and that's all. Now this is all configurable: you can un-ignore these and/or ignore more patterns of files. The `exclude_docs` config follows the [.gitignore pattern format](https://git-scm.com/docs/gitignore#\_pattern_format) and is specified as a multiline YAML string. For example: ```yaml exclude_docs: | *.py # Excludes e.g. docs/hooks/foo.py /drafts # Excludes e.g. docs/drafts/hello.md /requirements.txt # Excludes docs/requirements.txt ``` Validation of links (described above) is also affected by `exclude_docs`. During `mkdocs serve` the messages explain the interaction, whereas during `mkdocs build` excluded files are as good as nonexistent. As an additional related change, if you have a need to have both `README.md` and `index.md` files in a directory but publish only one of them, you can now use this feature to explicitly ignore one of them and avoid warnings. See [**documentation**](https://www.mkdocs.org/user-guide/configuration/#exclude_docs). Context: [#​3224](https://togithub.com/mkdocs/mkdocs/issues/3224) ##### Drafts The `exclude_docs` config has another behavior: all excluded Markdown pages will still be previewable in `mkdocs serve` only, just with a "DRAFT" marker on top. Then they will of course be excluded from `mkdocs build` or `gh-deploy`. If you don't want `mkdocs serve` to have any special behaviors and instead want it to perform completely normal builds, use the new flag `mkdocs serve --clean`. See [**documentation**](https://www.mkdocs.org/user-guide/configuration/#exclude_docs). Context: [#​3224](https://togithub.com/mkdocs/mkdocs/issues/3224) #### `mkdocs serve` no longer exits after build errors If there was an error (from the config or a plugin) during a site re-build, `mkdocs serve` used to exit after printing a stack trace. Now it will simply freeze the server until the author edits the files to fix the problem, and then will keep reloading. But errors on the *first* build still cause `mkdocs serve` to exit, as before. Context: [#​3255](https://togithub.com/mkdocs/mkdocs/issues/3255) #### Page titles will be deduced from any style of heading MkDocs always had the ability to infer the title of a page (if it's not specified in the `nav`) based on the first line of the document, if it had a `<h1>` heading that had to written starting with the exact character `#`. Now any style of Markdown heading is understood ([#​1886](https://togithub.com/mkdocs/mkdocs/issues/1886)). Due to the previous simplistic parsing, it was also impossible to use `attr_list` attributes in that first heading ([#​3136](https://togithub.com/mkdocs/mkdocs/issues/3136)). Now that is also fixed. #### Markdown extensions can use paths relative to the current document This is aimed at extensions such as `pymdownx.snippets` or `markdown_include.include`: you can now specify their include paths to be relative to the currently rendered Markdown document, or relative to the `docs_dir`. Any other extension can of course also make use of the new `!relative` YAML tag. ```yaml markdown_extensions: - pymdownx.snippets: base_path: !relative ``` See [**documentation**](https://www.mkdocs.org/user-guide/configuration/#paths-relative-to-the-current-file-or-site). Context: [#​2154](https://togithub.com/mkdocs/mkdocs/issues/2154), [#​3258](https://togithub.com/mkdocs/mkdocs/issues/3258) #### `<script>` tags can specify `type="module"` and other attributes In `extra_javascript`, if you use the `.mjs` file extension or explicitly specify a `type: module` key, the script will be added with the `type="module"` attribute. `defer: true` and `async: true` keys are also available. See [updated **documentation** for `extra_javascript`](https://www.mkdocs.org/user-guide/configuration/#extra_javascript). **At first this is only supported in built-in themes, other themes need to follow up, see below.** Context: [#​3237](https://togithub.com/mkdocs/mkdocs/issues/3237) #### Changes for theme developers (action required!) Using the construct `{% for script in extra_javascript %}` is now fully obsolete because it cannot allow customizing the attributes of the `<script>` tag. It will keep working but blocks some of MkDocs' features. Instead, you now need to use `config.extra_javascript` (which was already the case for a while) and couple it with the new `script_tag` filter: ```django {%- for script in config.extra_javascript %} {{ script | script_tag }} {%- endfor %} ``` See [**documentation**](https://www.mkdocs.org/dev-guide/themes/#picking-up-css-and-javascript-from-the-config). #### Upgrades for plugin developers - Breaking change: `config.extra_javascript` is no longer a plain list of strings, but instead a list of `ExtraScriptValue` items. So you can no longer treat the list values as strings. If you want to keep compatibility with old versions, just always reference the items as `str(item)` instead. And you can still append plain strings to the list if you wish. See information about `<script>` tags above. Context: [#​3237](https://togithub.com/mkdocs/mkdocs/issues/3237) - `File` has a new attribute `inclusion`. Its value is calculated from both the `exclude_docs` and `not_in_nav` configs, and implements their behavior. Plugins can read this value or write to it. New `File` instances by default follow whatever the configs say, but plugins can choose to make this decision explicitly, per file. - When creating a `File`, one can now set a `dest_uri` directly, rather than having to update it (and other dependent attributes) after creation. [Context](https://togithub.com/mkdocs/mkdocs/commit/d5af6426c52421f1113f6dcc591de1e01bea48bd) - A new config option was added - `DictOfItems`. Similarly to `ListOfItems`, it validates a mapping of config options that all have the same type. Keys are arbitrary but always strings. Context: [#​3242](https://togithub.com/mkdocs/mkdocs/issues/3242) - A new function `get_plugin_logger` was added. In order to opt into a standardized way for plugins to log messages, please use the idiom: ```python log = mkdocs.plugins.get_plugin_logger(__name__) ... log.info("Hello, world") ``` Context: [#​3245](https://togithub.com/mkdocs/mkdocs/issues/3245) - `SubConfig` config option can be conveniently subclassed with a particular type of config specified. For example, `class ExtraScript(SubConfig[ExtraScriptValue]):`. To see how this is useful, search for this class in code. [Context](https://togithub.com/mkdocs/mkdocs/commit/73e503990e3e3504bfe1cb627d41a7e97970687e) - Bugfix: `SubConfig` had a bug where paths (from `FilesystemObject` options) were not made relative to the main config file as intended, because `config_file_path` was not properly inherited to it. This is now fixed. Context: [#​3265](https://togithub.com/mkdocs/mkdocs/issues/3265) - `Config` members now have a way to avoid clashing with Python's reserved words. This is achieved by stripping a trailing underscore from each member's name. Example of adding an `async` boolean option that can be set by the user as `async: true` and read programmatically as `config.async_`: ```python class ExampleConfig(Config): async_ = Type(bool, default=False) ``` Previously making a config key with a reserved name was impossible with new-style schemas. [Context](https://togithub.com/mkdocs/mkdocs/commit/1db8e884fa7135a49adf7740add5d875a16a18bc) - `Theme` has its attributes properly declared and gained new attributes `theme.locale`, `theme.custom_dir`. - Some type annotations were made more precise. For example: - The `context` parameter has gained the type `TemplateContext` (`TypedDict`). [Context](https://togithub.com/mkdocs/mkdocs/commit/0f793b9984c7e6a1d53ce874e7d17b6d27ebf4b2) - The classes `Page`, `Section`, `Link` now have a common base class `StructureItem`. [Context](https://togithub.com/mkdocs/mkdocs/commit/01be507e30b05db0a4c44ef05ba62b2098010653) - Some methods stopped accepting `Config` and only accept `MkDocsConfig` as was originally intended. [Context](https://togithub.com/mkdocs/mkdocs/commit/c459cd24fc0320333f51525e9cf681d4a8370f50) - `config.mdx_configs` got a proper type. Context: [#​3229](https://togithub.com/mkdocs/mkdocs/issues/3229) #### Theme updates - Built-in themes mostly stopped relying on `<script defer>`. This may affect some usages of `extra_javascript`, mainly remove the need for custom handling of "has the page fully loaded yet". Context: [#​3237](https://togithub.com/mkdocs/mkdocs/issues/3237) - "mkdocs" theme now has a styling for `>` blockquotes, previously they were not distinguished at all. Context: [#​3291](https://togithub.com/mkdocs/mkdocs/issues/3291) - "readthedocs" theme was updated to v1.2.0 according to upstream, with improved styles for `<kbd>` and breadcrumb navigation. Context: [#​3058](https://togithub.com/mkdocs/mkdocs/issues/3058) - Both built-in themes had their version of highlight.js updated to 11.8.0, and jQuery updated to 3.6.0. #### Bug fixes ##### Relative paths in the nav can traverse above the root Regression in 1.2 - relative paths in the nav could no longer traverse above the site's root and were truncated to the root. Although such traversal is discouraged and produces a warning, this was a documented behavior. The behavior is now restored. Context: [#​2752](https://togithub.com/mkdocs/mkdocs/issues/2752), [#​3010](https://togithub.com/mkdocs/mkdocs/issues/3010) ##### MkDocs can accept the config from stdin This can be used for config overrides on the fly. See updated section at the bottom of [Configuration Inheritance](https://www.mkdocs.org/user-guide/configuration/#configuration-inheritance). The command to use this is `mkdocs build -f -`. In previous versions doing this led to an error. [Context](https://togithub.com/mkdocs/mkdocs/commit/d5bb15fa108da86a8e53fb7d84109d8f8d9d6453) #### New command line flags - `mkdocs --no-color build` disables color output and line wrapping. This option is also available through an environment variable `NO_COLOR=true`. Context: [#​3282](https://togithub.com/mkdocs/mkdocs/issues/3282) - `mkdocs build --no-strict` overrides the `strict` config to `false`. Context: [#​3254](https://togithub.com/mkdocs/mkdocs/issues/3254) - `mkdocs build -f -` (described directly above). - `mkdocs serve --clean` (described above). - `mkdocs serve --dirty` is the new name of `mkdocs serve --dirtyreload`. #### Deprecations - `extra_javascript` underwent a change that can break plugins in rare cases, and it requires attention from theme developers. See respective entries above. - Python-Markdown was unpinned from `<3.4`. That version is known to remove functionality. If you are affected by those removals, you can still choose to pin the version for yourself: `Markdown <3.4`. Context: [#​3222](https://togithub.com/mkdocs/mkdocs/issues/3222), [#​2892](https://togithub.com/mkdocs/mkdocs/issues/2892) - `mkdocs.utils.warning_filter` now shows a warning about being deprecated. It does nothing since MkDocs 1.2. Consider `get_plugin_logger` or just logging under `mkdocs.plugins.*` instead. Context: [#​3008](https://togithub.com/mkdocs/mkdocs/issues/3008) - Accessing the `_vars` attribute of a `Theme` is deprecated - just access the keys directly. - Accessing the `user_configs` attribute of a `Config` is deprecated. Note: instead of `config.user_configs[*]['theme']['custom_dir']`, please use the new attribute `config.theme.custom_dir`. Other small improvements; see [commit log](https://togithub.com/mkdocs/mkdocs/compare/1.4.3...1.5.0). </details> <details> <summary>fralau/mkdocs_macros_plugin (docs/mkdocs-macros-plugin)</summary> ### [`v1.0.4`](https://togithub.com/fralau/mkdocs_macros_plugin/blob/HEAD/CHANGELOG.md#104-2023-08-07) [Compare Source](https://togithub.com/fralau/mkdocs_macros_plugin/compare/v1.0.2...v1.0.4) - Fixed: Warning due to filter issue with mkdocs >= 1.5 - Fixed: Debug html tables (including for `macro_info()`) are now readable also in dark mode. </details> <details> <summary>squidfunk/mkdocs-material (docs/mkdocs-material)</summary> ### [`v9.1.21`](https://togithub.com/squidfunk/mkdocs-material/releases/tag/9.1.21): mkdocs-material-9.1.21 [Compare Source](https://togithub.com/squidfunk/mkdocs-material/compare/9.1.20...9.1.21) - Fixed MkDocs 1.4 compat issue in social plugin (9.1.20 regression) ### [`v9.1.20`](https://togithub.com/squidfunk/mkdocs-material/releases/tag/9.1.20): mkdocs-material-9.1.20 [Compare Source](https://togithub.com/squidfunk/mkdocs-material/compare/9.1.19...9.1.20) - Updated Sanskrit translations - Fixed deprecation warnings for social plugin ### [`v9.1.19`](https://togithub.com/squidfunk/mkdocs-material/releases/tag/9.1.19): mkdocs-material-9.1.19 [Compare Source](https://togithub.com/squidfunk/mkdocs-material/compare/9.1.18...9.1.19) - Added support for MkDocs 1.5+ - Fixed [#​5699](https://togithub.com/squidfunk/mkdocs-material/issues/5699): Improve error reporting in social plugin </details> <details> <summary>astral-sh/ruff (misc-lint/ruff)</summary> ### [`v0.0.283`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.283) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.282...v0.0.283) <!-- Release notes generated using configuration in .github/release.yml at main --> #### What's Changed ##### Breaking Changes - Assume Python 3.8 instead of 3.10 for target version by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6397](https://togithub.com/astral-sh/ruff/pull/6397) ##### Rules - \[`flake8-pyi`] `PYI019`: Detects if a type variable is used instead of `Self` in return annotations by [@​qdegraaf](https://togithub.com/qdegraaf) in [https://github.com/astral-sh/ruff/pull/6204](https://togithub.com/astral-sh/ruff/pull/6204) - \[`flake8-pyi`] `PYI051`: Detects unions of `Literal` types by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6215](https://togithub.com/astral-sh/ruff/pull/6215) - \[`flake8-pyi`] `PYI055`: Detects unions of `type`s by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6316](https://togithub.com/astral-sh/ruff/pull/6316) - \[`pylint`] `E1300`: Detects invalid string format characters by [@​silvanocerza](https://togithub.com/silvanocerza) in [https://github.com/astral-sh/ruff/pull/6171](https://togithub.com/astral-sh/ruff/pull/6171) - \[`pyupgrade`] `UP040`: Upgrades type alias annotations to use PEP-695 syntax by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6289](https://togithub.com/astral-sh/ruff/pull/6289) ##### Rule Changes - \[`flake8-boolean-trap`] `FBT003`: Add `is_` and `is_not` to excluded functions by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6307](https://togithub.com/astral-sh/ruff/pull/6307) - \[`flake8-logging-format`] Allow capitalized names for logger candidate heuristic match by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6356](https://togithub.com/astral-sh/ruff/pull/6356) - \[`flake8-pyi`] Applicable rules are now checked non-stub code by [@​andersk](https://togithub.com/andersk) in [https://github.com/astral-sh/ruff/pull/6297](https://togithub.com/astral-sh/ruff/pull/6297) - `PYI013`: [`ellipsis-in-non-empty-class-body`](https://beta.ruff.rs/docs/rules/ellipsis-in-non-empty-class-body) - `PYI016`: [`duplicate-union-member`](https://beta.ruff.rs/docs/rules/duplicate-union-member) - `PYI018`: [`unused-private-type-var`](https://beta.ruff.rs/docs/rules/unused-private-type-var) - `PYI019`: [`custom-type-var-return-type`](https://beta.ruff.rs/docs/rules/custom-type-var-return-type) - `PYI024`: [`collections-named-tuple`](https://beta.ruff.rs/docs/rules/collections-named-tuple) - `PYI025`: [`unaliased-collections-abc-set-import`](https://beta.ruff.rs/docs/rules/unaliased-collections-abc-set-import) - `PYI030`: [`unnecessary-literal-union`](https://beta.ruff.rs/docs/rules/unnecessary-literal-union) - `PYI032`: [`any-eq-ne-annotation`](https://beta.ruff.rs/docs/rules/any-eq-ne-annotation) - `PYI034`: [`non-self-return-type`](https://beta.ruff.rs/docs/rules/non-self-return-type) - `PYI036`: [`bad-exit-annotation`](https://beta.ruff.rs/docs/rules/bad-exit-annotation) - `PYI041`: [`redundant-numeric-union`](https://beta.ruff.rs/docs/rules/redundant-numeric-union) - `PYI042`: [`snake-case-type-alias`](https://beta.ruff.rs/docs/rules/snake-case-type-alias) - `PYI043`: [`t-suffixed-type-alias`](https://beta.ruff.rs/docs/rules/t-suffixed-type-alias) - `PYI045`: [`iter-method-return-iterable`](https://beta.ruff.rs/docs/rules/iter-method-return-iterable) - `PYI046`: [`unused-private-protocol`](https://beta.ruff.rs/docs/rules/unused-private-protocol) - `PYI047`: [`unused-private-type-alias`](https://beta.ruff.rs/docs/rules/unused-private-type-alias) - `PYI049`: [`unused-private-typed-dict`](https://beta.ruff.rs/docs/rules/unused-private-typed-dict) - `PYI050`: [`no-return-argument-annotation-in-stub`](https://beta.ruff.rs/docs/rules/no-return-argument-annotation-in-stub) (Python ≥ 3.11) - `PYI051`: [`redundant-literal-union`](https://beta.ruff.rs/docs/rules/redundant-literal-union) - `PYI056`: [`unsupported-method-call-on-all`](https://beta.ruff.rs/docs/rules/unsupported-method-call-on-all) - \[`flake8-pyi`] `PYI027` is being replaced by `PYI022` / `UP035` by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6354](https://togithub.com/astral-sh/ruff/pull/6354) - \[`pydocstyle`] `D103`: Don't require docstrings in `.pyi` files by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6239](https://togithub.com/astral-sh/ruff/pull/6239) - \[`pydocstyle`] `D203`: Ignore same-line docstrings for lines-before and lines-after rules by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6344](https://togithub.com/astral-sh/ruff/pull/6344) - \[`pylint`] `PLE0605`: Allow generic tuple and list calls in `__all__` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6247](https://togithub.com/astral-sh/ruff/pull/6247) - \[`pylint`] `PLR0124`: Add detection of comparisons with built-in calls by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6324](https://togithub.com/astral-sh/ruff/pull/6324) - \[`pyupgrade`] `UP032`: Add support for `await` expressions in f-strings by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6304](https://togithub.com/astral-sh/ruff/pull/6304) - \[`pyupgrade`] `UP032`: Add support for implicitly concatenated strings by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6263](https://togithub.com/astral-sh/ruff/pull/6263) - \[`pyupgrade`] `UP032`: Add support for repeated format fields by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6266](https://togithub.com/astral-sh/ruff/pull/6266) - \[`ruff`] `RUF012`: Permit `ClassVar` and `Final` without subscript by [@​bluetech](https://togithub.com/bluetech) in [https://github.com/astral-sh/ruff/pull/6273](https://togithub.com/astral-sh/ruff/pull/6273) ##### Bug Fixes - \[`flake8-bugbear`] `B006`: Respect `typing_extensions` imports of `Annotated` by [@​PIG208](https://togithub.com/PIG208) in [https://github.com/astral-sh/ruff/pull/6361](https://togithub.com/astral-sh/ruff/pull/6361) - \[`flake8-pyi`] `PYI019`: Fix panic with positional-only arguments by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6350](https://togithub.com/astral-sh/ruff/pull/6350) - \[`flake8-use-pathlib`] Avoid raising `PTH206` with `maxsplit` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6283](https://togithub.com/astral-sh/ruff/pull/6283) - \[`flake8`] `F841`: Update autofix to not remove Jupyer magic expressions by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6141](https://togithub.com/astral-sh/ruff/pull/6141) - \[`pycodestyle`] `E721`: Include comparisons to builtin types by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6325](https://togithub.com/astral-sh/ruff/pull/6325) - \[`pycodestyle`] `E721`: Match left-hand side `types()` call in `types-comparison` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6326](https://togithub.com/astral-sh/ruff/pull/6326) - \[`pyupgrade`] `UP031`: Avoid auto-fixing if there are comments within the right-hand side by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6364](https://togithub.com/astral-sh/ruff/pull/6364) - \[`pyupgrade`] `UP032`: Avoid auto-fixing if comments are present around format call arguments by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6342](https://togithub.com/astral-sh/ruff/pull/6342) - \[`pyupgrade`] `UP032`: Improve invalid expression check by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6308](https://togithub.com/astral-sh/ruff/pull/6308) - Avoid attempting to fix `.format(...)` calls with too-few-arguments by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6401](https://togithub.com/astral-sh/ruff/pull/6401) - Fix bug where `.gitignore` files in parent directories were incorrectly used by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6368](https://togithub.com/astral-sh/ruff/pull/6368) - Fix duplicate violations raised on nested bitwise or `Union` expressions by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6399](https://togithub.com/astral-sh/ruff/pull/6399) ##### Playground - Add a simple tooltip to the sidebar by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6295](https://togithub.com/astral-sh/ruff/pull/6295) - Add an icon for FIR by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6292](https://togithub.com/astral-sh/ruff/pull/6292) - Increase icon opacity on-hover by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6291](https://togithub.com/astral-sh/ruff/pull/6291) - Tweak background on theme button by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6290](https://togithub.com/astral-sh/ruff/pull/6290) ##### Other Changes - Improve handling of violations around Jupyter magic expressions by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/5552](https://togithub.com/astral-sh/ruff/pull/5552) - Reduce memory usage by boxing type params and arguments fields on the class definition node by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6275](https://togithub.com/astral-sh/ruff/pull/6275) - Upgrade Rust to 1.71 by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/6323](https://togithub.com/astral-sh/ruff/pull/6323) #### New Contributors - [@​silvanocerza](https://togithub.com/silvanocerza) made their first contribution in [https://github.com/astral-sh/ruff/pull/6171](https://togithub.com/astral-sh/ruff/pull/6171) - [@​PIG208](https://togithub.com/PIG208) made their first contribution in [https://github.com/astral-sh/ruff/pull/6361](https://togithub.com/astral-sh/ruff/pull/6361) **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.282...v0.0.283 ### [`v0.0.282`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.282) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.281...v0.0.282) <!-- Release notes generated using configuration in .github/release.yml at v0.0.282 --> #### What's Changed ##### Bug Fixes - Reset model state when exiting deferred visitors by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6208](https://togithub.com/astral-sh/ruff/pull/6208) - Skip trivia when searching for named exception by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6218](https://togithub.com/astral-sh/ruff/pull/6218) - Avoid PERF401 false positive on list access in loop by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6220](https://togithub.com/astral-sh/ruff/pull/6220) - Avoid detecting continuations at non-start-of-line by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6219](https://togithub.com/astral-sh/ruff/pull/6219) - Revert "Expand scope of `quoted-annotation` rule ([#​5766](https://togithub.com/astral-sh/ruff/issues/5766))" by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6237](https://togithub.com/astral-sh/ruff/pull/6237) #### New Contributors - [@​klistwan](https://togithub.com/klistwan) made their first contribution in [https://github.com/astral-sh/ruff/pull/6146](https://togithub.com/astral-sh/ruff/pull/6146) **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.281...v0.0.282 ### [`v0.0.281`](https://togithub.com/astral-sh/ruff/releases/tag/v0.0.281) [Compare Source](https://togithub.com/astral-sh/ruff/compare/v0.0.280...v0.0.281) <!-- Release notes generated using configuration in .github/release.yml at v0.0.281 --> #### What's Changed See the [release blog post](https://astral.sh/blog/ruff-v0.0.281) for more, including detailed descriptions of any newly added rules. ##### New rules - \[`flake8-pyi`] Implement `PYI018` by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6018](https://togithub.com/astral-sh/ruff/pull/6018) - \[`flake8-pyi`] Implement `PYI047` by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6134](https://togithub.com/astral-sh/ruff/pull/6134) - \[`flake8-pyi`] Implement `PYI049` by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6136](https://togithub.com/astral-sh/ruff/pull/6136) - \[`flake8-pyi`] Implement `PYI056` by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/5959](https://togithub.com/astral-sh/ruff/pull/5959) - \[`flake8-pyi`] Implement `PYI046` by [@​LaBatata101](https://togithub.com/LaBatata101) in [https://github.com/astral-sh/ruff/pull/6098](https://togithub.com/astral-sh/ruff/pull/6098) - \[`flake8-use-pathlib`] Implement `glob` (`PTH207`) by [@​sbrugman](https://togithub.com/sbrugman) in [https://github.com/astral-sh/ruff/pull/5939](https://togithub.com/astral-sh/ruff/pull/5939) - \[`flake8-use-pathlib`] Implement `os-sep-split` (`PTH206`) by [@​sbrugman](https://togithub.com/sbrugman) in [https://github.com/astral-sh/ruff/pull/5936](https://togithub.com/astral-sh/ruff/pull/5936) - \[`pycodestyle`] Implement `E241` and `E242` (tab/multiple ws after commas) by [@​akx](https://togithub.com/akx) in [https://github.com/astral-sh/ruff/pull/6094](https://togithub.com/astral-sh/ruff/pull/6094) - \[`pylint`] Implement `self-assigning-variable` (`W0127`) by [@​tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/6015](https://togithub.com/astral-sh/ruff/pull/6015) - \[`pylint`] Implement `eq-without-hash` rule (PLW1641) by [@​jelly](https://togithub.com/jelly) in [https://github.com/astral-sh/ruff/pull/5955](https://togithub.com/astral-sh/ruff/pull/5955) - \[`pylint`] Implement `subprocess-popen-preexec-fn` (`W1509`) by [@​tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5978](https://togithub.com/astral-sh/ruff/pull/5978) ##### Rule changes - \[`flake8-bugbear`] Extends `B002` to detect unary prefix decrement operators by [@​tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/5998](https://togithub.com/astral-sh/ruff/pull/5998) - \[`flake8-pytest-style`] Avoid raising PT012 for simple `with` statements by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6081](https://togithub.com/astral-sh/ruff/pull/6081) - \[`flake8-pytest-style`] Allow pytest.raises body to contain a single func or class definition by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6083](https://togithub.com/astral-sh/ruff/pull/6083) - \[`flake8-simplify`] Extend SIM118 with `not in` by [@​sbrugman](https://togithub.com/sbrugman) in [https://github.com/astral-sh/ruff/pull/5995](https://togithub.com/astral-sh/ruff/pull/5995) - \[`perflint`] Skip `PERF203` violations for multi-statement loops by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6145](https://togithub.com/astral-sh/ruff/pull/6145) - \[`pyupgrade`] Add support for `int`, `float`, `bool` in `UP018` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6013](https://togithub.com/astral-sh/ruff/pull/6013) - \[`tryceratops`] Add suggested fix for `TRY201` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6008](https://togithub.com/astral-sh/ruff/pull/6008) ##### Settings - Allow specification of `logging.Logger` re-exports via `logger-objects` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5750](https://togithub.com/astral-sh/ruff/pull/5750) - Set default `max-complexity` to 10 for empty McCabe settings by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6073](https://togithub.com/astral-sh/ruff/pull/6073) - \[`pep8-naming`]: New config option `extend-ignore-names` by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6169](https://togithub.com/astral-sh/ruff/pull/6169) ##### Bug Fixes - Avoid raising `UP032` if `format` call arguments contain multiline expressions by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/5971](https://togithub.com/astral-sh/ruff/pull/5971) - Fix `F507` false positive by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/5986](https://togithub.com/astral-sh/ruff/pull/5986) - Fix logging rules with whitespace around dot by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6022](https://togithub.com/astral-sh/ruff/pull/6022) - Ignore end-of-line comments when dirtying if-with-same-arms branches by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6031](https://togithub.com/astral-sh/ruff/pull/6031) - Avoid treating `Literal` members as expressions with `__future__` by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6032](https://togithub.com/astral-sh/ruff/pull/6032) - Avoid refactoring `x[:1]`-like slices in RUF015 by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6150](https://togithub.com/astral-sh/ruff/pull/6150) - Avoid key-in-dict violations for `self` accesses by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6165](https://togithub.com/astral-sh/ruff/pull/6165) - Avoid falsely marking non-submodules as submodule aliases by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6182](https://togithub.com/astral-sh/ruff/pull/6182) - Flag `[` as an invalid noqa suffix by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/5982](https://togithub.com/astral-sh/ruff/pull/5982) - Ignore some common builtin overrides on standard library subclasses by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6074](https://togithub.com/astral-sh/ruff/pull/6074) - Avoid A003 violations for explicitly overridden methods by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6076](https://togithub.com/astral-sh/ruff/pull/6076) - Include file permissions in key for cached files by [@​zanieb](https://togithub.com/zanieb) in [https://github.com/astral-sh/ruff/pull/5901](https://togithub.com/astral-sh/ruff/pull/5901) - Ignore `explicit-string-concatenation` on single line by [@​tjkuson](https://togithub.com/tjkuson) in [https://github.com/astral-sh/ruff/pull/6028](https://togithub.com/astral-sh/ruff/pull/6028) - Fix `SIM102` to handle indented `elif` by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6072](https://togithub.com/astral-sh/ruff/pull/6072) - Raise `PTH201` for `Path("")` by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/6095](https://togithub.com/astral-sh/ruff/pull/6095) - Update `SIM115` to cover `pathlib.Path.open` by [@​harupy](https://togithub.com/harupy) in [https://github.com/astral-sh/ruff/pull/611](https://togithub.com/astral-sh/ruff/pull/611) - Ignore end-of-line file exemption comments by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6160](https://togithub.com/astral-sh/ruff/pull/6160) - Implement `--diff` for Jupyter Notebooks by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6149](https://togithub.com/astral-sh/ruff/pull/6149) - Skip BOM when determining Locator's line starts by [@​charliermarsh](https://togithub.com/charliermarsh) in [https://github.com/astral-sh/ruff/pull/6159](https://togithub.com/astral-sh/ruff/pull/6159) - Avoid parenthesizing comprehension element by [@​dhruvmanila](https://togithub.com/dhruvmanila) in [https://github.com/astral-sh/ruff/pull/6198](https://togithub.com/astral-sh/ruff/pull/6198) - Do not raise `SIM105` for non-exceptions by [@​sbrugman](https://togithub.com/sbrugman) in [https://github.com/astral-sh/ruff/pull/5985](https://togithub.com/astral-sh/ruff/pull/5985) #### New Contributors - [@​AlexWaygood](https://togithub.com/AlexWaygood) made their first contribution in [https://github.com/astral-sh/ruff/pull/5973](https://togithub.com/astral-sh/ruff/pull/5973) - [@​RMPR](https://togithub.com/RMPR) made their first contribution in [https://github.com/astral-sh/ruff/pull/6048](https://togithub.com/astral-sh/ruff/pull/6048) - [@​arembridge](https://togithub.com/arembridge) made their first contribution in [https://github.com/astral-sh/ruff/pull/6079](https://togithub.com/astral-sh/ruff/pull/6079) - [@​Eutropios](https://togithub.com/Eutropios) made their first contribution in [https://github.com/astral-sh/ruff/pull/6082](https://togithub.com/astral-sh/ruff/pull/6082) - [@​jelly](https://togithub.com/jelly) made their first contribution in [https://github.com/astral-sh/ruff/pull/5955](https://togithub.com/astral-sh/ruff/pull/5955) **Full Changelog**: https://github.com/astral-sh/ruff/compare/v0.0.280...v0.0.281 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "every 3 months on the first day of the month" (UTC), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 👻 **Immortal**: This PR will be recreated if closed unmerged. Get [config help](https://togithub.com/renovatebot/renovate/discussions) if that's undesired. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/AlexWaygood/typeshed-stats). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNi40My4yIiwidXBkYXRlZEluVmVyIjoiMzYuNDMuMiIsInRhcmdldEJyYW5jaCI6Im1haW4ifQ==--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Alex Waygood <[email protected]>
Of the rules that flake8-pyi enforces for
.pyi
type stubs, many of them equally make sense to check in normal runtime code with type annotations. Broaden these rules to check all files:PYI013 ellipsis-in-non-empty-class-body
PYI016 duplicate-union-member
PYI018 unused-private-type-var
PYI019 custom-type-var-return-type
PYI024 collections-named-tuple
PYI025 unaliased-collections-abc-set-import
PYI030 unnecessary-literal-union
PYI032 any-eq-ne-annotation
PYI034 non-self-return-type
PYI036 bad-exit-annotation
PYI041 redundant-numeric-union
PYI042 snake-case-type-alias
PYI043 t-suffixed-type-alias
PYI045 iter-method-return-iterable
PYI046 unused-private-protocol
PYI047 unused-private-type-alias
PYI049 unused-private-typed-dict
PYI050 no-return-argument-annotation-in-stub (Python ≥ 3.11)
PYI051 redundant-literal-union
PYI056 unsupported-method-call-on-all
The other rules are stub-specific and remain enabled only in
.pyi
files.PYI001 unprefixed-type-param
PYI002 complex-if-statement-in-stub
PYI003 unrecognized-version-info-check
PYI004 patch-version-comparison
PYI005 wrong-tuple-length-version-comparison (could make sense to broaden, see #6297 (comment))
PYI006 bad-version-info-comparison (same)
PYI007 unrecognized-platform-check
PYI008 unrecognized-platform-name
PYI009 pass-statement-stub-body
PYI010 non-empty-stub-body
PYI011 typed-argument-default-in-stub
PYI012 pass-in-class-body
PYI014 argument-default-in-stub
PYI015 assignment-default-in-stub
PYI017 complex-assignment-in-stub
PYI020 quoted-annotation-in-stub
PYI021 docstring-in-stub
PYI026 type-alias-without-annotation (could make sense to broaden, but gives many false positives on runtime code as currently implemented)
PYI029 str-or-repr-defined-in-stub
PYI033 type-comment-in-stub
PYI035 unassigned-special-variable-in-stub
PYI044 future-annotations-in-stub
PYI048 stub-body-multiple-statements
PYI052 unannotated-assignment-in-stub
PYI053 string-or-bytes-too-long
PYI054 numeric-literal-too-long