Преглед на файлове

chore: fix code style

pull/193/head
Jérôme Deuchnord преди 2 години
родител
ревизия
4f41b64058
No known key found for this signature in database GPG ключ ID: 9F72B1EF93EDE1D4
променени са 4 файла, в които са добавени 11 реда и са изтрити 6 реда
  1. +1
    -1
      _kosmorro/__version__.py
  2. +0
    -1
      _kosmorro/debug.py
  3. +1
    -2
      _kosmorro/dumper.py
  4. +9
    -2
      _kosmorro/i18n/strings.py

+ 1
- 1
_kosmorro/__version__.py Целия файл

@@ -19,7 +19,7 @@
__title__ = "kosmorro"
__description__ = "A program that computes your ephemerides"
__url__ = "https://kosmorro.space"
__version__ = '0.10.1'
__version__ = "0.10.1"
__author__ = "Jérôme Deuchnord"
__author_email__ = "jerome@deuchnord.fr"
__license__ = "AGPL"


+ 0
- 1
_kosmorro/debug.py Целия файл

@@ -13,4 +13,3 @@ def debug_print(what, force: bool = False):
print_exception(type(what), value=what, tb=None)
else:
print("[DEBUG] %s" % what)


+ 1
- 2
_kosmorro/dumper.py Целия файл

@@ -447,8 +447,7 @@ class _LatexDumper(Dumper):
continue

latex.append(
r"\event{%s}{%s}"
% (event.start_time.strftime(TIME_FORMAT), event_name)
r"\event{%s}{%s}" % (event.start_time.strftime(TIME_FORMAT), event_name)
)

return "".join(latex)


+ 9
- 2
_kosmorro/i18n/strings.py Целия файл

@@ -10,7 +10,14 @@ def from_event(event: Event, with_description: bool = True) -> str:
EventType.OPPOSITION: (_("%s is in opposition"), None),
EventType.CONJUNCTION: (_("%s and %s are in conjunction"), None),
EventType.OCCULTATION: (_("%s occults %s"), None),
EventType.MAXIMAL_ELONGATION: (_("Elongation of %s is maximal"), ('{:.3n}°'.format(event.details['deg']) if type(event.details) is dict else event.details)),
EventType.MAXIMAL_ELONGATION: (
_("Elongation of %s is maximal"),
(
"{:.3n}°".format(event.details["deg"])
if type(event.details) is dict
else event.details
),
),
EventType.MOON_PERIGEE: (_("%s is at its perigee"), None),
EventType.MOON_APOGEE: (_("%s is at its apogee"), None),
}.get(event.event_type)
@@ -21,7 +28,7 @@ def from_event(event: Event, with_description: bool = True) -> str:
string = string % tuple([from_object(o.identifier) for o in event.objects])

if details is not None and with_description:
return '%s (%s)' % (string, details)
return "%s (%s)" % (string, details)

return string



Зареждане…
Отказ
Запис