Skip to content

Commit

Permalink
Fix emoji #177 (#185)
Browse files Browse the repository at this point in the history
* Fix emoji

* Update readme
  • Loading branch information
hakancelikdev committed May 8, 2021
1 parent f5d371a commit 44e08a9
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 5 deletions.
6 changes: 5 additions & 1 deletion docs/CHANGELOG.md
Expand Up @@ -2,9 +2,13 @@

All notable changes to this project will be documented in this file.

## Unreleased - ././

- [Fix emoji issues by @hakancelik96](https://github.com/hakancelik96/unimport/pull/185)

## [0.8.0] - 09/02/2021

- Temporarily drop support for duplicate imports.
- Temporarily drop support for duplicate imports. by @isidentical

## [0.7.4] - 19/02/2021

Expand Down
6 changes: 6 additions & 0 deletions tests/test_emoji.py
@@ -0,0 +1,6 @@
from unimport import emoji


def test_emoji():
assert emoji.STAR == "🤩"
assert emoji.PARTYING_FACE == "🥳"
2 changes: 1 addition & 1 deletion tests/test_utils.py
Expand Up @@ -36,7 +36,7 @@ class UtilsTestCase(unittest.TestCase):
include_star_import = True

def test_list_paths(self):
self.assertEqual(len(list(utils.list_paths(Path("tests")))), 28)
self.assertEqual(len(list(utils.list_paths(Path("tests")))), 29)
self.assertEqual(
len(list(utils.list_paths(Path("tests/test_config.py")))), 1
)
Expand Down
4 changes: 4 additions & 0 deletions unimport/emoji.py
@@ -0,0 +1,4 @@
__all__ = ["PARTYING_FACE", "STAR"]

STAR = "\U0001F929"
PARTYING_FACE = "\U0001F973"
6 changes: 3 additions & 3 deletions unimport/main.py
Expand Up @@ -5,7 +5,7 @@

from unimport import color
from unimport import constants as C
from unimport import utils
from unimport import emoji, utils
from unimport.analyzer import Analyzer
from unimport.config import CONFIG_FILES, Config, DefaultConfig
from unimport.refactor import refactor_string
Expand All @@ -20,7 +20,7 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
parser = argparse.ArgumentParser(
prog="unimport",
description=C.DESCRIPTION,
epilog="Get rid of all unused imports 🥳",
epilog=f"Get rid of all unused imports {emoji.PARTYING_FACE}",
)
exclusive_group = parser.add_mutually_exclusive_group(required=False)
parser.add_argument(
Expand Down Expand Up @@ -195,7 +195,7 @@ def main(argv: Optional[Sequence[str]] = None) -> int:
if not unused_modules and config.check:
print(
color.paint(
"✨ Congratulations there is no unused import in your project. ",
f"{emoji.STAR} Congratulations there is no unused import in your project. {emoji.STAR}",
color.GREEN,
)
)
Expand Down

0 comments on commit 44e08a9

Please sign in to comment.