Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Prevent emitting invalid-name #8337

Merged

Conversation

mbyrnepr2
Copy link
Member

@mbyrnepr2 mbyrnepr2 commented Feb 24, 2023

Prevent emitting invalid-name for the line on which a global statement is declared.

Type of Changes

Type
βœ“ πŸ› Bug fix
✨ New feature
πŸ”¨ Refactoring
πŸ“œ Docs

Description

The visit_global function seems to be redundant because the visit_assignname method is already running the self._check_name("const", node.name, node) method on the node representing the module-level assignment.

Closes #8307

# Prevent emitting `invalid-name` for the line on which `global` is declared
# https://github.com/PyCQA/pylint/issues/8307

_foo: str = "tomato"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

But it should be raised here, right ?

Suggested change
_foo: str = "tomato"
_foo: str = "tomato" # [disallowed-name]

Copy link
Member Author

@mbyrnepr2 mbyrnepr2 Feb 24, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No because that's the rule we have defined for nodes.Assign vs nodes.AnnAssign. See the big if/elif block here; If it is an AnnAssign, then the const rule-checking is ignored unless it is annotated with Final.

I know the reporter of the issue mentions that it should emit a message for this line but that isn't currently how it works for these module-level assignments. In other words currently, for module-level assignments, _foo: str = "tomato" doesn't emit a message while _foo = "tomato" does.

I'm not saying that behaviour is ideal but I think its valuable to at least remove the checking from the line where global is declared, to prevent duplicating what happens in the visit_assignname method.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah sorry I'm confused about it, there's a lot of discussion around invalid-name, hard to know what's done or not (#7305). There's also almost too much to digest in https://pylint.readthedocs.io/en/latest/user_guide/messages/convention/invalid-name.html and yet no explanation about Final.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have a global-variable-undefined message which will be emitted when the global name is not defined in the module scope. So, when it is defined in the module scope the invalid-name rule-checks are triggered by visit_assignname.

… delaration names a class name in camelCase.
@codecov
Copy link

codecov bot commented Feb 24, 2023

Codecov Report

Merging #8337 (718be26) into main (8bf1120) will decrease coverage by 0.01%.
The diff coverage is n/a.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #8337      +/-   ##
==========================================
- Coverage   95.46%   95.46%   -0.01%     
==========================================
  Files         177      177              
  Lines       18704    18700       -4     
==========================================
- Hits        17856    17852       -4     
  Misses        848      848              
Impacted Files Coverage Ξ”
pylint/checkers/base/name_checker/checker.py 99.22% <ΓΈ> (-0.02%) ⬇️

@github-actions
Copy link
Contributor

πŸ€– Effect of this PR on checked open source code: πŸ€–

Effect on black:
The following messages are no longer emitted:

  1. invalid-name:
    Constant name "_type_reprs" doesn't conform to UPPER_CASE naming style
    https://github.com/psf/black/blob/d9b8a6407e2f46304a8d36b18e4a73d8e0613519/src/blib2to3/pytree.py#L41
  2. invalid-name:
    Constant name "python_grammar" doesn't conform to UPPER_CASE naming style
    https://github.com/psf/black/blob/d9b8a6407e2f46304a8d36b18e4a73d8e0613519/src/blib2to3/pygram.py#L165
  3. invalid-name:
    Constant name "python_grammar_no_print_statement" doesn't conform to UPPER_CASE naming style
    https://github.com/psf/black/blob/d9b8a6407e2f46304a8d36b18e4a73d8e0613519/src/blib2to3/pygram.py#L166
  4. invalid-name:
    Constant name "python_grammar_no_print_statement_no_exec_statement" doesn't conform to UPPER_CASE naming style
    https://github.com/psf/black/blob/d9b8a6407e2f46304a8d36b18e4a73d8e0613519/src/blib2to3/pygram.py#L167
  5. invalid-name:
    Constant name "python_grammar_no_print_statement_no_exec_statement_async_keywords" doesn't conform to UPPER_CASE naming style
    https://github.com/psf/black/blob/d9b8a6407e2f46304a8d36b18e4a73d8e0613519/src/blib2to3/pygram.py#L168
  6. invalid-name:
    Constant name "python_grammar_soft_keywords" doesn't conform to UPPER_CASE naming style
    https://github.com/psf/black/blob/d9b8a6407e2f46304a8d36b18e4a73d8e0613519/src/blib2to3/pygram.py#L169
  7. invalid-name:
    Constant name "python_symbols" doesn't conform to UPPER_CASE naming style
    https://github.com/psf/black/blob/d9b8a6407e2f46304a8d36b18e4a73d8e0613519/src/blib2to3/pygram.py#L170
  8. invalid-name:
    Constant name "pattern_grammar" doesn't conform to UPPER_CASE naming style
    https://github.com/psf/black/blob/d9b8a6407e2f46304a8d36b18e4a73d8e0613519/src/blib2to3/pygram.py#L171
  9. invalid-name:
    Constant name "pattern_symbols" doesn't conform to UPPER_CASE naming style
    https://github.com/psf/black/blob/d9b8a6407e2f46304a8d36b18e4a73d8e0613519/src/blib2to3/pygram.py#L172

Effect on django:
The following messages are no longer emitted:

  1. invalid-name:
    Constant name "_serializers" doesn't conform to UPPER_CASE naming style
    https://github.com/django/django/blob/16c966ff7fc9ce01e3afd87ef2af55859cadb587/django/core/serializers/__init__.py#L155
  2. invalid-name:
    Constant name "_format_cache" doesn't conform to UPPER_CASE naming style
    https://github.com/django/django/blob/16c966ff7fc9ce01e3afd87ef2af55859cadb587/django/utils/formats.py#L57
  3. invalid-name:
    Constant name "_format_modules_cache" doesn't conform to UPPER_CASE naming style
    https://github.com/django/django/blob/16c966ff7fc9ce01e3afd87ef2af55859cadb587/django/utils/formats.py#L57
  4. invalid-name:
    Constant name "_exception" doesn't conform to UPPER_CASE naming style
    https://github.com/django/django/blob/16c966ff7fc9ce01e3afd87ef2af55859cadb587/django/utils/autoreload.py#L62
  5. invalid-name:
    Constant name "_exception" doesn't conform to UPPER_CASE naming style
    https://github.com/django/django/blob/16c966ff7fc9ce01e3afd87ef2af55859cadb587/django/utils/autoreload.py#L85
  6. invalid-name:
    Constant name "_translations" doesn't conform to UPPER_CASE naming style
    https://github.com/django/django/blob/16c966ff7fc9ce01e3afd87ef2af55859cadb587/django/utils/translation/trans_real.py#L290
  7. invalid-name:
    Constant name "_default" doesn't conform to UPPER_CASE naming style
    https://github.com/django/django/blob/16c966ff7fc9ce01e3afd87ef2af55859cadb587/django/utils/translation/trans_real.py#L358
  8. invalid-name:
    Constant name "_default" doesn't conform to UPPER_CASE naming style
    https://github.com/django/django/blob/16c966ff7fc9ce01e3afd87ef2af55859cadb587/django/utils/translation/trans_real.py#L374
  9. invalid-name:
    Constant name "_default" doesn't conform to UPPER_CASE naming style
    https://github.com/django/django/blob/16c966ff7fc9ce01e3afd87ef2af55859cadb587/django/utils/translation/trans_real.py#L416
  10. invalid-name:
    Constant name "_srid_cache" doesn't conform to UPPER_CASE naming style
    https://github.com/django/django/blob/16c966ff7fc9ce01e3afd87ef2af55859cadb587/django/contrib/gis/db/models/fields.py#L40
  11. invalid-name:
    Constant name "_worker_id" doesn't conform to UPPER_CASE naming style
    https://github.com/django/django/blob/16c966ff7fc9ce01e3afd87ef2af55859cadb587/django/test/runner.py#L412

Effect on pandas:
The following messages are no longer emitted:

  1. invalid-name:
    Constant name "_table_mod" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/io/pytables.py#L233
  2. invalid-name:
    Constant name "_table_file_open_policy_is_strict" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/io/pytables.py#L234
  3. invalid-name:
    Constant name "QApplication" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/io/clipboard/__init__.py#L146
  4. invalid-name:
    Constant name "Foundation" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/io/clipboard/__init__.py#L515
  5. invalid-name:
    Constant name "AppKit" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/io/clipboard/__init__.py#L515
  6. invalid-name:
    Constant name "qtpy" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/io/clipboard/__init__.py#L515
  7. invalid-name:
    Constant name "PyQt4" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/io/clipboard/__init__.py#L515
  8. invalid-name:
    Constant name "PyQt5" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/io/clipboard/__init__.py#L515
  9. invalid-name:
    Constant name "copy" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/io/clipboard/__init__.py#L597
  10. invalid-name:
    Constant name "paste" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/io/clipboard/__init__.py#L597
  11. invalid-name:
    Constant name "copy" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/io/clipboard/__init__.py#L637
  12. invalid-name:
    Constant name "paste" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/io/clipboard/__init__.py#L637
  13. invalid-name:
    Constant name "copy" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/io/clipboard/__init__.py#L659
  14. invalid-name:
    Constant name "paste" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/io/clipboard/__init__.py#L659
  15. invalid-name:
    Constant name "_evaluate" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/core/computation/expressions.py#L49
  16. invalid-name:
    Constant name "_where" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/core/computation/expressions.py#L49
  17. invalid-name:
    Constant name "_is_scipy_sparse" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/core/dtypes/common.py#L263
  18. invalid-name:
    Constant name "register_option" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/_config/config.py#L769
  19. invalid-name:
    Constant name "get_option" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/_config/config.py#L769
  20. invalid-name:
    Constant name "set_option" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/_config/config.py#L769
  21. invalid-name:
    Constant name "_initial_defencoding" doesn't conform to UPPER_CASE naming style
    https://github.com/pandas-dev/pandas/blob/ae7b6d6b7644b8667b7fcd6d213951cd6b2c0f4c/pandas/_config/display.py#L22

Effect on psycopg:
The following messages are no longer emitted:

  1. invalid-name:
    Constant name "version" doesn't conform to UPPER_CASE naming style
    https://github.com/psycopg/psycopg/blob/8ca1d4ef95264b32c069eb81ee5f68f1d0c16587/psycopg/psycopg/pq/__init__.py#L56
  2. invalid-name:
    Constant name "PGconn" doesn't conform to UPPER_CASE naming style
    https://github.com/psycopg/psycopg/blob/8ca1d4ef95264b32c069eb81ee5f68f1d0c16587/psycopg/psycopg/pq/__init__.py#L57
  3. invalid-name:
    Constant name "PGresult" doesn't conform to UPPER_CASE naming style
    https://github.com/psycopg/psycopg/blob/8ca1d4ef95264b32c069eb81ee5f68f1d0c16587/psycopg/psycopg/pq/__init__.py#L57
  4. invalid-name:
    Constant name "Conninfo" doesn't conform to UPPER_CASE naming style
    https://github.com/psycopg/psycopg/blob/8ca1d4ef95264b32c069eb81ee5f68f1d0c16587/psycopg/psycopg/pq/__init__.py#L57
  5. invalid-name:
    Constant name "Escaping" doesn't conform to UPPER_CASE naming style
    https://github.com/psycopg/psycopg/blob/8ca1d4ef95264b32c069eb81ee5f68f1d0c16587/psycopg/psycopg/pq/__init__.py#L57
  6. invalid-name:
    Constant name "PGcancel" doesn't conform to UPPER_CASE naming style
    https://github.com/psycopg/psycopg/blob/8ca1d4ef95264b32c069eb81ee5f68f1d0c16587/psycopg/psycopg/pq/__init__.py#L57
  7. invalid-name:
    Constant name "ip_address" doesn't conform to UPPER_CASE naming style
    https://github.com/psycopg/psycopg/blob/8ca1d4ef95264b32c069eb81ee5f68f1d0c16587/psycopg/psycopg/types/net.py#L41
  8. invalid-name:
    Constant name "ip_interface" doesn't conform to UPPER_CASE naming style
    https://github.com/psycopg/psycopg/blob/8ca1d4ef95264b32c069eb81ee5f68f1d0c16587/psycopg/psycopg/types/net.py#L41
  9. invalid-name:
    Constant name "ip_network" doesn't conform to UPPER_CASE naming style
    https://github.com/psycopg/psycopg/blob/8ca1d4ef95264b32c069eb81ee5f68f1d0c16587/psycopg/psycopg/types/net.py#L41
  10. invalid-name:
    Constant name "IPv4Address" doesn't conform to UPPER_CASE naming style
    https://github.com/psycopg/psycopg/blob/8ca1d4ef95264b32c069eb81ee5f68f1d0c16587/psycopg/psycopg/types/net.py#L42
  11. invalid-name:
    Constant name "IPv6Address" doesn't conform to UPPER_CASE naming style
    https://github.com/psycopg/psycopg/blob/8ca1d4ef95264b32c069eb81ee5f68f1d0c16587/psycopg/psycopg/types/net.py#L42
  12. invalid-name:
    Constant name "IPv4Interface" doesn't conform to UPPER_CASE naming style
    https://github.com/psycopg/psycopg/blob/8ca1d4ef95264b32c069eb81ee5f68f1d0c16587/psycopg/psycopg/types/net.py#L42
  13. invalid-name:
    Constant name "IPv6Interface" doesn't conform to UPPER_CASE naming style
    https://github.com/psycopg/psycopg/blob/8ca1d4ef95264b32c069eb81ee5f68f1d0c16587/psycopg/psycopg/types/net.py#L42
  14. invalid-name:
    Constant name "IPv4Network" doesn't conform to UPPER_CASE naming style
    https://github.com/psycopg/psycopg/blob/8ca1d4ef95264b32c069eb81ee5f68f1d0c16587/psycopg/psycopg/types/net.py#L43
  15. invalid-name:
    Constant name "IPv6Network" doesn't conform to UPPER_CASE naming style
    https://github.com/psycopg/psycopg/blob/8ca1d4ef95264b32c069eb81ee5f68f1d0c16587/psycopg/psycopg/types/net.py#L43

Effect on pygame:
The following messages are no longer emitted:

  1. invalid-name:
    Constant name "_ft_init" doesn't conform to UPPER_CASE naming style
    https://github.com/pygame/pygame/blob/3c8dc09385485c2588895195aa14383e498c5de1/src_py/fastevent.py#L28
  2. invalid-name:
    Constant name "_ft_init" doesn't conform to UPPER_CASE naming style
    https://github.com/pygame/pygame/blob/3c8dc09385485c2588895195aa14383e498c5de1/src_py/fastevent.py#L36
  3. invalid-name:
    Constant name "list_cameras" doesn't conform to UPPER_CASE naming style
    https://github.com/pygame/pygame/blob/3c8dc09385485c2588895195aa14383e498c5de1/src_py/camera.py#L88
  4. invalid-name:
    Constant name "Camera" doesn't conform to UPPER_CASE naming style
    https://github.com/pygame/pygame/blob/3c8dc09385485c2588895195aa14383e498c5de1/src_py/camera.py#L88
  5. invalid-name:
    Constant name "_is_init" doesn't conform to UPPER_CASE naming style
    https://github.com/pygame/pygame/blob/3c8dc09385485c2588895195aa14383e498c5de1/src_py/camera.py#L158
  6. invalid-name:
    Constant name "_is_init" doesn't conform to UPPER_CASE naming style
    https://github.com/pygame/pygame/blob/3c8dc09385485c2588895195aa14383e498c5de1/src_py/camera.py#L190
  7. invalid-name:
    Constant name "Camera" doesn't conform to UPPER_CASE naming style
    https://github.com/pygame/pygame/blob/3c8dc09385485c2588895195aa14383e498c5de1/src_py/camera.py#L190
  8. invalid-name:
    Constant name "list_cameras" doesn't conform to UPPER_CASE naming style
    https://github.com/pygame/pygame/blob/3c8dc09385485c2588895195aa14383e498c5de1/src_py/camera.py#L190
  9. invalid-name:
    Constant name "vidcap" doesn't conform to UPPER_CASE naming style
    https://github.com/pygame/pygame/blob/3c8dc09385485c2588895195aa14383e498c5de1/src_py/_camera_vidcapture.py#L30
  10. invalid-name:
    Constant name "vidcap" doesn't conform to UPPER_CASE naming style
    https://github.com/pygame/pygame/blob/3c8dc09385485c2588895195aa14383e498c5de1/src_py/_camera_vidcapture.py#L39
  11. invalid-name:
    Constant name "is_init" doesn't conform to UPPER_CASE naming style
    https://github.com/pygame/pygame/blob/3c8dc09385485c2588895195aa14383e498c5de1/src_py/sysfont.py#L350
  12. invalid-name:
    Constant name "_wq" doesn't conform to UPPER_CASE naming style
    https://github.com/pygame/pygame/blob/3c8dc09385485c2588895195aa14383e498c5de1/src_py/threads/__init__.py#L45
  13. invalid-name:
    Constant name "_use_workers" doesn't conform to UPPER_CASE naming style
    https://github.com/pygame/pygame/blob/3c8dc09385485c2588895195aa14383e498c5de1/src_py/threads/__init__.py#L45
  14. invalid-name:
    Constant name "_wq" doesn't conform to UPPER_CASE naming style
    https://github.com/pygame/pygame/blob/3c8dc09385485c2588895195aa14383e498c5de1/src_py/threads/__init__.py#L58
  15. invalid-name:
    Constant name "_use_workers" doesn't conform to UPPER_CASE naming style
    https://github.com/pygame/pygame/blob/3c8dc09385485c2588895195aa14383e498c5de1/src_py/threads/__init__.py#L58

Effect on sentry:
The following messages are no longer emitted:

  1. invalid-name:
    Constant name "_receivers_that_raise" doesn't conform to UPPER_CASE naming style
    https://github.com/getsentry/sentry/blob/cda307a2b70c44fdb5cbd8f424e0c1391f73cf50/src/sentry/signals.py#L28
  2. invalid-name:
    Constant name "_receivers_that_raise" doesn't conform to UPPER_CASE naming style
    https://github.com/getsentry/sentry/blob/cda307a2b70c44fdb5cbd8f424e0c1391f73cf50/src/sentry/signals.py#L45
  3. invalid-name:
    Constant name "_local_cache_enabled" doesn't conform to UPPER_CASE naming style
    https://github.com/getsentry/sentry/blob/cda307a2b70c44fdb5cbd8f424e0c1391f73cf50/src/sentry/db/models/manager/base.py#L79
  4. invalid-name:
    Constant name "_local_cache_generation" doesn't conform to UPPER_CASE naming style
    https://github.com/getsentry/sentry/blob/cda307a2b70c44fdb5cbd8f424e0c1391f73cf50/src/sentry/db/models/manager/base.py#L79
  5. invalid-name:
    Constant name "__installed" doesn't conform to UPPER_CASE naming style
    https://github.com/getsentry/sentry/blob/cda307a2b70c44fdb5cbd8f424e0c1391f73cf50/src/sentry/runner/settings.py#L88
  6. invalid-name:
    Constant name "_client" doesn't conform to UPPER_CASE naming style
    https://github.com/getsentry/sentry/blob/cda307a2b70c44fdb5cbd8f424e0c1391f73cf50/src/sentry/filestore/gcs.py#L68
  7. invalid-name:
    Constant name "geo_by_addr" doesn't conform to UPPER_CASE naming style
    https://github.com/getsentry/sentry/blob/cda307a2b70c44fdb5cbd8f424e0c1391f73cf50/src/sentry/utils/geo.py#L18
  8. invalid-name:
    Constant name "rust_geoip" doesn't conform to UPPER_CASE naming style
    https://github.com/getsentry/sentry/blob/cda307a2b70c44fdb5cbd8f424e0c1391f73cf50/src/sentry/utils/geo.py#L48
  9. invalid-name:
    Constant name "outcomes_publisher" doesn't conform to UPPER_CASE naming style
    https://github.com/getsentry/sentry/blob/cda307a2b70c44fdb5cbd8f424e0c1391f73cf50/src/sentry/utils/outcomes.py#L60
  10. invalid-name:
    Constant name "billing_publisher" doesn't conform to UPPER_CASE naming style
    https://github.com/getsentry/sentry/blob/cda307a2b70c44fdb5cbd8f424e0c1391f73cf50/src/sentry/utils/outcomes.py#L61
  11. invalid-name:
    Constant name "_from_email_domain_cache" doesn't conform to UPPER_CASE naming style
    https://github.com/getsentry/sentry/blob/cda307a2b70c44fdb5cbd8f424e0c1391f73cf50/src/sentry/utils/email/address.py#L24
  12. invalid-name:
    Constant name "_default_password_validators" doesn't conform to UPPER_CASE naming style
    https://github.com/getsentry/sentry/blob/cda307a2b70c44fdb5cbd8f424e0c1391f73cf50/src/sentry/auth/password_validation.py#L14
  13. invalid-name:
    Constant name "replay_publisher" doesn't conform to UPPER_CASE naming style
    https://github.com/getsentry/sentry/blob/cda307a2b70c44fdb5cbd8f424e0c1391f73cf50/src/sentry/replays/tasks.py#L69
  14. invalid-name:
    Constant name "__rrweb_id" doesn't conform to UPPER_CASE naming style
    https://github.com/getsentry/sentry/blob/cda307a2b70c44fdb5cbd8f424e0c1391f73cf50/src/sentry/replays/testutils.py#L306

Effect on poetry-core:
The following messages are no longer emitted:

  1. invalid-name:
    Constant name "_executable" doesn't conform to UPPER_CASE naming style
    https://github.com/python-poetry/poetry-core/blob/6d73e7eb574dce9ff1eb4bfa0c5dcfa0d96a4ee2/src/poetry/core/vcs/git.py#L156
  2. invalid-name:
    Constant name "_executable" doesn't conform to UPPER_CASE naming style
    https://github.com/python-poetry/poetry-core/blob/6d73e7eb574dce9ff1eb4bfa0c5dcfa0d96a4ee2/src/poetry/core/vcs/git.py#L188

This comment was generated for commit 718be26

@Pierre-Sassoulas Pierre-Sassoulas merged commit d30c45b into pylint-dev:main Feb 27, 2023
@github-actions
Copy link
Contributor

The backport to maintenance/2.16.x failed:

The process '/usr/bin/git' failed with exit code 1

To backport manually, run these commands in your terminal:

# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-maintenance/2.16.x maintenance/2.16.x
# Navigate to the new working tree
cd .worktrees/backport-maintenance/2.16.x
# Create a new branch
git switch --create backport-8337-to-maintenance/2.16.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 d30c45b2e7a0c13a846c8d221f0c9ff9f012aa4a
# Push it to GitHub
git push --set-upstream origin backport-8337-to-maintenance/2.16.x
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-maintenance/2.16.x

Then, create a pull request where the base branch is maintenance/2.16.x and the compare/head branch is backport-8337-to-maintenance/2.16.x.

@Pierre-Sassoulas Pierre-Sassoulas added the Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer label Feb 27, 2023
Pierre-Sassoulas added a commit to Pierre-Sassoulas/pylint that referenced this pull request Feb 27, 2023
…v#8337)

Closes pylint-dev#8307

Co-authored-by: Pierre Sassoulas <pierre.sassoulas@gmail.com>
@Pierre-Sassoulas Pierre-Sassoulas removed the Needs backport Needs to be cherry-picked on the current patch version by a pylint's maintainer label Feb 27, 2023
Pierre-Sassoulas added a commit that referenced this pull request Feb 27, 2023
…8354)

Closes #8307

Co-authored-by: Mark Byrne <31762852+mbyrnepr2@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

'Constant name doesn't conform' warning on global statement instead of declaration
2 participants