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

refactor: Clean up imports and remove unnecessary blank lines #90

Merged
merged 2 commits into from
May 15, 2023

Conversation

dciborow
Copy link
Collaborator

Description

Testing

Additional context

@dciborow dciborow enabled auto-merge (squash) May 15, 2023 17:41
src/gpt_review/_llama_index.py Outdated Show resolved Hide resolved
src/gpt_review/_review.py Outdated Show resolved Hide resolved
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary by GPT-4

The code changes reorder the import statements in multiple files. The changes do not affect the functionality of the code.

Suggestions

Here are some suggestions to improve the changes in this PR:

  1. Maintain consistency in import order. Group imports by standard library, third-party libraries, and local modules.

  2. Remove unnecessary blank lines.

Here's the updated code with these suggestions applied:

diff --git a/src/gpt/__main__.py b/src/gpt/__main__.py
index 8fcb708a..bd149a6a 100644
--- a/src/gpt/__main__.py
+++ b/src/gpt/__main__.py
@@ -3,7 +3,6 @@
 
 from gpt_review._gpt_cli import cli
 
-
 if __name__ == "__main__":
     exit_code = cli()
     sys.exit(exit_code)
diff --git a/src/gpt_review/__main__.py b/src/gpt_review/__main__.py
index 8fcb708a..bd149a6a 100644
--- a/src/gpt_review/__main__.py
+++ b/src/gpt_review/__main__.py
@@ -3,7 +3,6 @@
 
 from gpt_review._gpt_cli import cli
 
-
 if __name__ == "__main__":
     exit_code = cli()
     sys.exit(exit_code)
diff --git a/src/gpt_review/_ask.py b/src/gpt_review/_ask.py
index 89271ded..3753a801 100644
--- a/src/gpt_review/_ask.py
+++ b/src/gpt_review/_ask.py
@@ -7,11 +7,10 @@
 from knack.commands import CommandGroup
 from knack.util import CLIError
 
+import gpt_review.constants as C
 from gpt_review._command import GPTCommandGroup
 from gpt_review._llama_index import _query_index
 from g-

@dciborow dciborow changed the title Refactor: Clean up imports and remove unnecessary blank lines refactor: Clean up imports and remove unnecessary blank lines May 15, 2023
@codecov-commenter
Copy link

codecov-commenter commented May 15, 2023

Codecov Report

Merging #90 (8ccb99c) into main (60c0d8e) will decrease coverage by 7.58%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##              main      #90      +/-   ##
===========================================
- Coverage   100.00%   92.42%   -7.58%     
===========================================
  Files           13       13              
  Lines          462      462              
  Branches        67       44      -23     
===========================================
- Hits           462      427      -35     
- Misses           0       31      +31     
- Partials         0        4       +4     
Flag Coverage Δ
integration ?
unittests ?
unittests-3.10 92.42% <100.00%> (ø)
unittests-3.11 ?
unittests-3.8 ?
unittests-3.9 ?

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
src/gpt_review/_ask.py 100.00% <100.00%> (ø)
src/gpt_review/_git.py 100.00% <100.00%> (ø)
src/gpt_review/_github.py 68.65% <100.00%> (-31.35%) ⬇️
src/gpt_review/_gpt_cli.py 100.00% <100.00%> (ø)
src/gpt_review/_llama_index.py 88.00% <100.00%> (-12.00%) ⬇️
src/gpt_review/_review.py 100.00% <100.00%> (ø)
src/gpt_review/context.py 100.00% <100.00%> (ø)
src/gpt_review/prompts/_prompt.py 91.66% <100.00%> (-8.34%) ⬇️

... and 1 file with indirect coverage changes

@dciborow dciborow merged commit e2503d3 into microsoft:main May 15, 2023
@dciborow dciborow deleted the dciborow/sort-imports branch May 15, 2023 17:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants