Flake8 F824 for global variable scoping

Ouverte
#357 0 commentaires 0 réactions 1 personne assignée Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

@cpswan y travaille déjà.

Depuis le 25/4/2025.

Évaluation

Cette issue n'a pas encore été évaluée.

Description

bug
Describe the bug

#355 introduced Flake8 7.2.0, which added a new variable scoping check. at_client currently fails that test throwing an F824 error:

./at_client/atclient.py:348:13: F824 `global should_be_running_lock` is unused: name is never assigned in scope
            global should_be_running_lock
            ^
./at_client/atclient.py:371:13: F824 `global should_be_running_lock` is unused: name is never assigned in scope
            global should_be_running_lock
            ^
./at_client/connections/atmonitorconnection.py:37:9: F824 `global should_be_running_lock` is unused: name is never assigned in scope
        global should_be_running_lock
        ^
./examples/repl.py:93:17: F824 `global shared_queue` is unused: name is never assigned in scope
                global shared_queue
                ^
4     F824 `global should_be_running_lock` is unused: name is never assigned in scope
4

https://github.com/atsign-foundation/at_python/pull/355/commits/d7f839491e35269f2ec0121bb5200117e6d44157 put in place a workaround, and this ticket is to track its eventual removal.

Steps to reproduce

Run flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics --exclude .venv,.git without --ignore=F824

Expected behavior

Lints pass clean

Langage dominant
Python
Étoiles
0
Forks
4
Merge moyen
3 h 52 min
PR mergées (30 j)
17

Préparer son environnement

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de atsign-foundation/at_python

Toutes les issues de atsign-foundation/at_python

Issues similaires

Plus d'issues Python

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.