Skip to content

Commit

Permalink
Fix to use the function fix_file() separately with options parameter
Browse files Browse the repository at this point in the history
  • Loading branch information
kulkarnisg authored Dec 18, 2023
1 parent af7399d commit 3ef2f10
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions autopep8.py
Original file line number Diff line number Diff line change
Expand Up @@ -3585,6 +3585,9 @@ def fix_file(filename, options=None, output=None, apply_config=False):
original_source = readlines_from_file(filename)

fixed_source = original_source
# Fix to use the function fix_file separately from python script with options as parameter
if isinstance(options, dict):
options = _get_options(options, apply_config)

if options.in_place or options.diff or output:
encoding = detect_encoding(filename)
Expand Down

0 comments on commit 3ef2f10

Please sign in to comment.