Parser for skillpopup_stat_filters.txt
Overview¶
Path | PyPoE/poe/file/stat_filters.py |
Version | 1.0.0a0 |
Revision | $Id: 8c0f2a25e79bc2ed8def2092c3857fd2b946684a $ |
Author | Omega_K2 |
Description¶
Parser for Metadata/StatDescriptions/skillpopup_stat_filters.txt
Agreement¶
See PyPoE/LICENSE
Documentation¶
Public API¶
-
class
PyPoE.poe.file.stat_filters.
StatFilterFile
[source]¶ Bases:
PyPoE.poe.file.shared.AbstractFileReadOnly
Parser for Metadata/skillpopup_stat_filters.txt
Variables: - groups (dict[str, list[str]]) – Dictionary containing stat groups with the id as key, and the list of stats as value
- skills (dict[str, SkillEntry]) – Dictionary mapping the active skill id (as key) to a the respective
SkillEntry
instance as value.
-
__init__
¶ Initialize self. See help(type(self)) for accurate signature.
-
get_read_buffer
(file_path_or_raw, function, *args, **kwargs)¶ Will attempt to open the given file_path_or_raw in read mode and pass the buffer to the specified function. The function must accept at least one keyword argument called ‘buffer’.
Parameters: - file_path_or_raw (BytesIO | bytes | str) – file path, bytes or buffer to read from
- args – Additional positional arguments to pass to the specified function
- kwargs – Additional keyword arguments to pass to the specified function
Returns: Result of the function
Return type: Raises: TypeError
– if file_path_or_raw has an invalid type
-
read
(file_path_or_raw, *args, **kwargs)¶ Reads the file contents into the specified path or buffer. This will also reset any existing contents of the file.
If a buffer or bytes was given, the data will be read from the buffer or bytes object.
If a file path was given, the resulting data will be read from the specified file.
Parameters: - file_path_or_raw (BytesIO | bytes | str) – file path, bytes or buffer to read from
- args – Additional positional arguments
- kwargs – Additional keyword arguments
Returns: result of the read operation, if any
Return type: Raises: TypeError
– if file_path_or_raw has an invalid type