Skip to content

Commit

Permalink
Consolidate import of collections
Browse files Browse the repository at this point in the history
  • Loading branch information
j-t-1 authored Nov 18, 2024
1 parent 4b3b1e2 commit 8818fff
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions pefile.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@
__contact__ = "[email protected]"

import codecs
import collections
import copy as copymod
import functools
import gc
Expand All @@ -32,7 +31,7 @@
import struct
import time
import uuid
from collections import Counter
from collections import Counter, defaultdict
from hashlib import md5, sha1, sha256, sha512
from typing import Union

Expand Down Expand Up @@ -5469,7 +5468,7 @@ def length_until_eof(rva):
- export_dir.AddressOfNames
)

symbol_counts = collections.defaultdict(int)
symbol_counts = defaultdict(int)
export_parsing_loop_completed_normally = True
for i in range(min(export_dir.NumberOfNames, int(safety_boundary / 4))):
symbol_ordinal = self.get_word_from_data(address_of_name_ordinals, i)
Expand Down Expand Up @@ -5586,7 +5585,7 @@ def length_until_eof(rva):
- export_dir.AddressOfFunctions
)

symbol_counts = collections.defaultdict(int)
symbol_counts = defaultdict(int)
export_parsing_loop_completed_normally = True
for idx in range(min(export_dir.NumberOfFunctions, int(safety_boundary / 4))):
if idx + export_dir.Base not in ordinals:
Expand Down

0 comments on commit 8818fff

Please sign in to comment.