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

duplicate imports - pep-8 #129

Closed
clach04 opened this issue Nov 1, 2022 · 1 comment
Closed

duplicate imports - pep-8 #129

clach04 opened this issue Nov 1, 2022 · 1 comment

Comments

@clach04
Copy link
Contributor

clach04 commented Nov 1, 2022

Lines:

have duplicate imports of datetime.

Any interested in adopting https://peps.python.org/pep-0008/#imports convention?

This may seem like a navel gazing exercise BUT for me to get (partially) working windows support I would like to have the 3 import sections clearly delineated:

  1. stdlib
  2. 3rd party
  3. local

I want to hack number 2:

(py310venv) C:\code\py\simplenotes\sncli_upstream>git diff simplenote_cli/sncli.py
diff --git a/simplenote_cli/sncli.py b/simplenote_cli/sncli.py
index c7b550d..bf9ed9f 100644
--- a/simplenote_cli/sncli.py
+++ b/simplenote_cli/sncli.py
@@ -4,7 +4,11 @@

 import os, sys, getopt, re, signal, time, datetime, shlex, hashlib
 import subprocess, threading, logging
-import copy, json, urwid, datetime
+import copy, json, datetime
+
+import urwid
+from . import urwid_win_patch
+
 from . import view_titles, view_note, view_help, view_log, user_input
 from . import utils, temp
 from .config import Config

Related ticket #119

@samuelallan72
Copy link

Any interested in adopting https://peps.python.org/pep-0008/#imports convention?

Absolutely, I'm on board. 👍

clach04 added a commit to clach04/sncli that referenced this issue Nov 2, 2022
Used isort to automate. Now have per line imports following pep8 order.
Remove duplicate datetime import.
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

No branches or pull requests

2 participants