Patchwork [8,of,8] match: reformat `syntaxes` dictionary for better maintainability

login
register
mail settings
Submitter Boris Feld
Date Nov. 21, 2018, 6:33 p.m.
Message ID <865075265c79c576c53c.1542825238@localhost.localdomain>
Download mbox | patch
Permalink /patch/36704/
State Accepted
Headers show

Comments

Boris Feld - Nov. 21, 2018, 6:33 p.m.
# HG changeset patch
# User Boris Feld <boris.feld@octobus.net>
# Date 1542647994 0
#      Mon Nov 19 17:19:54 2018 +0000
# Node ID 865075265c79c576c53c1bd2b1a6d4b9f5719e2d
# Parent  8992601f1d1a54a42c984518097a246b49c06c12
# EXP-Topic perf-ignore
# Available At https://bitbucket.org/octobus/mercurial-devel/
#              hg pull https://bitbucket.org/octobus/mercurial-devel/ -r 865075265c79
match: reformat `syntaxes` dictionary for better maintainability

Patch

diff --git a/mercurial/match.py b/mercurial/match.py
--- a/mercurial/match.py
+++ b/mercurial/match.py
@@ -1346,8 +1346,13 @@  def readpatternfile(filepath, warn, sour
     (pattern, lineno, originalline). This is useful to debug ignore patterns.
     '''
 
-    syntaxes = {'re': 'relre:', 'regexp': 'relre:', 'glob': 'relglob:',
-                'include': 'include', 'subinclude': 'subinclude'}
+    syntaxes = {
+        're': 'relre:',
+        'regexp': 'relre:',
+        'glob': 'relglob:',
+        'include': 'include',
+        'subinclude': 'subinclude',
+    }
     syntax = 'relre:'
     patterns = []