Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consolidate import of collections #437

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading