File tree Expand file tree Collapse file tree 4 files changed +7
-4
lines changed
Expand file tree Collapse file tree 4 files changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -155,13 +155,14 @@ your config file as **~/.config/bpython/config** (i.e.
155155Dependencies
156156============
157157* Pygments
158- * requests
159158* curtsies >= 0.3.3
160159* greenlet
160+ * requests
161+ * xdg
161162* Sphinx >= 1.5 (optional, for the documentation)
162163* babel (optional, for internationalization)
163- * watchdog (optional, for monitoring imported modules for changes)
164164* jedi (optional, for experimental multiline completion)
165+ * watchdog (optional, for monitoring imported modules for changes)
165166
166167bpython-urwid
167168-------------
Original file line number Diff line number Diff line change 33import locale
44from itertools import chain
55from configparser import ConfigParser
6+ from xdg import BaseDirectory
67
78from .autocomplete import AutocompleteModes
89
@@ -34,8 +35,7 @@ def supports_box_chars():
3435
3536def get_config_home ():
3637 """Returns the base directory for bpython's configuration files."""
37- xdg_config_home = os .environ .get ("XDG_CONFIG_HOME" , "~/.config" )
38- return os .path .join (xdg_config_home , "bpython" )
38+ return os .path .join (BaseDirectory .xdg_config_home , "bpython" )
3939
4040
4141def default_config_path ():
Original file line number Diff line number Diff line change @@ -3,3 +3,4 @@ curtsies >=0.3.3
33greenlet
44requests
55setuptools
6+ xdg
Original file line number Diff line number Diff line change @@ -174,6 +174,7 @@ def git_describe_to_python_version(version):
174174 "curtsies >=0.3.3" ,
175175 "greenlet" ,
176176 "wcwidth" ,
177+ "xdg" ,
177178]
178179
179180extras_require = {
You can’t perform that action at this time.
0 commit comments