@@ -370,7 +370,7 @@ def add_macro(mname, *encodings):
370370 :param mname: macro name
371371 :param encodings: encoding names of the encodings to be chained with the macro
372372 """
373- global PERS_MACROS
373+ global PERS_MACROS # noqa: F824
374374 # check for name clash with alreday existing macros and codecs
375375 if mname in MACROS or mname in PERS_MACROS :
376376 raise ValueError ("Macro name already exists" )
@@ -630,7 +630,7 @@ def __get_value(token, position, case_changed=False):
630630
631631def clear ():
632632 """ Clear codext's local registry of search functions. """
633- global __codecs_registry , MACROS , PERS_MACROS
633+ global __codecs_registry , MACROS , PERS_MACROS # noqa: F824
634634 __codecs_registry , MACROS , PERS_MACROS = [], {}, {}
635635codecs .clear = clear
636636
@@ -733,7 +733,7 @@ def list_macros():
733733def remove (name ):
734734 """ Remove all search functions matching the input encoding name from codext's local registry or any macro with the
735735 given name. """
736- global __codecs_registry , MACROS , PERS_MACROS
736+ global __codecs_registry , MACROS , PERS_MACROS # noqa: F824
737737 tbr = []
738738 for search_function in __codecs_registry :
739739 if search_function (name ) is not None :
@@ -764,7 +764,7 @@ def remove(name):
764764
765765def reset ():
766766 """ Reset codext's local registry of search functions and macros. """
767- global __codecs_registry , CODECS_REGISTRY , MACROS , PERS_MACROS
767+ global __codecs_registry , CODECS_REGISTRY , MACROS , PERS_MACROS # noqa: F824
768768 clear ()
769769 d = os .path .dirname (__file__ )
770770 for pkg in sorted (os .listdir (d )):
0 commit comments