insanum / sncli

Simplenote CLI
MIT License
397 stars 35 forks source link

duplicate imports - pep-8 #129

Closed clach04 closed 1 year ago

clach04 commented 2 years ago

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 https://github.com/insanum/sncli/issues/119

samuelallan72 commented 2 years ago

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

Absolutely, I'm on board. :+1: