Conversation
1. constants.py - Added TypedDict definitions and type aliases: - ModuleInfo = tuple[int, str, str] - RawRows = dict[int, list[list[str]]] - RegisterDict, FieldDict, BlockDict TypedDict classes with NotRequired fields 2. download.py - Added return type: - main() -> None 3. extract_tables.py - Added return type: - main() -> None 4. build_csv.py - Comprehensive type hints for 28 functions: - Helper functions: _get_mod_header, _atoi, natural_keys, get_raw_rows, clean_row - Register extraction: _is_register_code, _map_register_row, extract_registers_list - Field processing: _is_joined_index, _split_code_desc, _format_row, _map_row_mod_header, _is_reg_row, _apply_camelot_patch, _is_field_row, extract_register_fields - Field conversion: _normalize_field_code, _convert_field_type, _convert_field_required, _convert_field_in_out, _convert_values, _convert_rules, _map_field_row - CSV builders: build_accurate_fields_csv, build_usable_fields_csv, build_registers_csv - Getters: get_fields, get_registers - Block functions: extract_blocks, get_blocks - Sorting: _sort_header_order, _get_usable_csv_header - Main: main(patch: bool) -> None 5. gen_odoo.py - Added type hints for 8 functions: - Module-level: collect_register_children, _get_alphanum_sequence, get_structure, main - Class methods: registry_comodel, odoo_class_name, _extract_number_attrs 6. get_table_headers.py - Fixed broken imports and added type hints: - Fixed: Removed references to non-existent MOST_RECENT_YEAR and OLDEST_YEAR - Changed: Parameter from year to target_layout to match new architecture - Added: Type hints for get_mod_table_headers and main
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Os primeiros commits são para melhorar o código
Os outros commits são para suportar o layout 20 do EFD ICMS IPI, obrigatório a partir de Janeiro desse ano..
O pdf do layout 20 do EFD ICMS IPI mudou muito, em especial o numero e conteúdo das colunas.
layout 19:

layout 20:

além disso os crânios concursados que fizeram esses pdfs nem consegue copiar uma tabela sem fazer error, deixaram um buraco aqui por exemplo e eu tive que fazer um patch para preencher..
O diff dos csv gerido é maior do que ele realmente é porque eu mudei o formato dos finais das linhas para Linux. Mas o cranios da fazenda tb adicionaram ou tiraram pontos no fim da descrição de muitos campos por exemplo...
O diff real pro EFD ICMS IPI pode ser visto neste commit 1e8c083
Não ha diff pros outros relatórios (vou fazer o commit depois com a mudança dos finais de linha num PR separado para não atrapalhar aqui).