Add this suggestion to a batch that can be applied as a single commit. This suggestion is invalid because no changes were made to the code. Suggestions cannot be applied while the pull request is closed. Suggestions cannot be applied while viewing a subset of changes. Only one suggestion per line can be applied in a batch. Add this suggestion to a batch that can be applied as a single commit. Applying suggestions on deleted lines is not supported. You must change the existing code in this line in order to create a valid suggestion. Outdated suggestions cannot be applied. This suggestion has been applied or marked resolved. Suggestions cannot be applied from pending reviews. Suggestions cannot be applied on multi-line comments. Suggestions cannot be applied while the pull request is queued to merge. Suggestion cannot be applied right now. Please check back later.
User description
💥 What does this PR do?
This PR fixes many type hint issues and upgrades them to be Python 3.9+ syntax compliant (moving many data types to use
collections.abc)🔄 Types of changes
PR Type
Bug fix, Enhancement
Description
Upgrade type hints to Python 3.9+ syntax throughout codebase
Replace legacy
List,Dict,Tuple, etc. with built-in generics (e.g.,list,dict,tuple)Move type hints to use
collections.abcwhere appropriateRemove unused or redundant imports for cleaner code
Changes walkthrough 📝
48 files
Update Sequence import to use collections.abcUse collections.abc.Iterable and update type hintsUse built-in generics and collections.abc.MappingReplace List/Dict with list/dict in type hintsUse collections.abc.Mapping and update type hintsReplace List with list in type hintsUse list instead of List for actions attributeUse dict instead of Dict for encode methodUse dict instead of Dict for _convert_keysRemove unused imports and update type hints to list/dictReplace Dict/List with dict/list in type hintsUse collections.abc for async generators and iteratorsUse dict instead of Dict for command_builderUse list instead of List for args type hintReplace Dict/List with dict/list in type hintsUse dict instead of Dict in type hintsUse dict instead of Dict for _custom_findersUse list instead of List for get_accounts return typeUse collections.abc.AsyncGenerator and update type hintsUse list instead of List for _argumentsUse list/dict instead of List/Dict/Tuple in type hintsUse list instead of List for args and log_itemsUse collections.abc.Mapping and update type hintsUse dict instead of Dict for JSONTimeoutsUse collections.abc.Iterable and list for keys_to_typingUse dict instead of Dict for to_dict methodsUse collections.abc.Mapping and update type hintsUse dict instead of Dict for optsUse collections.abc.Mapping and update type hintsUse dict instead of Dict for _options and _additionalUse list instead of List for service_argsUse dict instead of Dict for check_responseUse list instead of List for account_listUse list/dict instead of List/Dict in type hintsUse list instead of List for find_elementsUse dict instead of Dict for default_capabilitiesUse collections.abc.Mapping and update type hintsUse collections.abc.Sequence and update Match importUse list and tuple built-ins in type hintsUse built-in generics for tuple/list in type hintsUse dict/list instead of Dict/List for LocatorType and filtersUse list instead of List for options and all_selected_optionsUse tuple instead of Tuple for IGNORED_EXCEPTIONSUse collections.abc.Mapping and update type hintsUse dict instead of Dict for default_capabilitiesUse collections.abc.Mapping and update type hintsUse list instead of List for credential_id type hintUse tuple instead of Tuple for data fixture1 files
Remove redundant pytest import formatting1 files
Remove explicit encoding in open for text file