1
0
mirror of https://github.com/nvbn/thefuck.git synced 2025-07-29 18:29:45 +01:00
Files
.github
tests
entrypoints
functional
output_readers
rules
shells
specific
__init__.py
conftest.py
test_argument_parser.py
test_conf.py
test_corrector.py
test_logs.py
test_readme.py
test_types.py
test_ui.py
test_utils.py
utils.py
thefuck
.editorconfig
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE.md
MANIFEST.in
README.md
appveyor.yml
example.gif
example_instant_mode.gif
fastentrypoints.py
install.sh
release.py
requirements.txt
setup.cfg
setup.py
snapcraft.yaml
tox.ini
thefuck/tests/utils.py
2017-08-31 17:58:56 +02:00

21 lines
775 B
Python

from thefuck import types
from thefuck.const import DEFAULT_PRIORITY
class Rule(types.Rule):
def __init__(self, name='', match=lambda *_: True,
get_new_command=lambda *_: '',
enabled_by_default=True,
side_effect=None,
priority=DEFAULT_PRIORITY,
requires_output=True):
super(Rule, self).__init__(name, match, get_new_command,
enabled_by_default, side_effect,
priority, requires_output)
class CorrectedCommand(types.CorrectedCommand):
def __init__(self, script='', side_effect=None, priority=DEFAULT_PRIORITY):
super(CorrectedCommand, self).__init__(
script, side_effect, priority)