Skip to content

Document F824 #1975

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

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/source/user/error-codes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ generates its own :term:`error code`\ s for ``pyflakes``:
+------+---------------------------------------------------------------------+
| F823 | local variable ``name`` ... referenced before assignment |
+------+---------------------------------------------------------------------+
| F824 | global variable ``name`` is unused: name is never assigned in scope |
Copy link
Member

Choose a reason for hiding this comment

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

not specifically global, but also nonlocal. and it's not that the variable is unused it's specifically the classification of the name

Copy link
Author

Choose a reason for hiding this comment

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

perhaps:

variable name marked as global/nonlocal but never assigned to

Copy link
Member

Choose a reason for hiding this comment

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

just use the actual error message why are you trying to rewrite it

Copy link
Author

Choose a reason for hiding this comment

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

the actual message I got is "global ... is unused: name is never assigned in scope"

which is basically what I wrote originally?

Copy link
Member

Choose a reason for hiding this comment

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

but that's not the error message either -- and your "basically what I wrote" is an incorrect rewording and it missed that it can also be nonlocal

I'm trying to give you a chance but I'm just going to do this myself and save everyone the trouble since this has wasted enough of my time already trying to help you

+------+---------------------------------------------------------------------+
| F831 | duplicate argument ``name`` in function definition |
+------+---------------------------------------------------------------------+
| F841 | local variable ``name`` is assigned to but never used |
Expand Down