mirror of
https://github.com/github/codeql.git
synced 2026-05-02 12:15:17 +02:00
python: Inline expectation should have space after $
This was a regex-find-replace from `# \$(?! )` (using a negative lookahead) to `# $ `.
This commit is contained in:
@@ -5,35 +5,35 @@ see https://www.pyinvoke.org/
|
||||
|
||||
import invoke
|
||||
|
||||
invoke.run("cmd1; cmd2") # $getCommand="cmd1; cmd2"
|
||||
invoke.run(command="cmd1; cmd2") # $getCommand="cmd1; cmd2"
|
||||
invoke.run("cmd1; cmd2") # $ getCommand="cmd1; cmd2"
|
||||
invoke.run(command="cmd1; cmd2") # $ getCommand="cmd1; cmd2"
|
||||
|
||||
|
||||
def with_sudo():
|
||||
invoke.sudo("cmd1; cmd2") # $getCommand="cmd1; cmd2"
|
||||
invoke.sudo(command="cmd1; cmd2") # $getCommand="cmd1; cmd2"
|
||||
invoke.sudo("cmd1; cmd2") # $ getCommand="cmd1; cmd2"
|
||||
invoke.sudo(command="cmd1; cmd2") # $ getCommand="cmd1; cmd2"
|
||||
|
||||
|
||||
def manual_context():
|
||||
c = invoke.Context()
|
||||
c.run("cmd1; cmd2") # $getCommand="cmd1; cmd2"
|
||||
c.sudo("cmd1; cmd2") # $getCommand="cmd1; cmd2"
|
||||
c.run("cmd1; cmd2") # $ getCommand="cmd1; cmd2"
|
||||
c.sudo("cmd1; cmd2") # $ getCommand="cmd1; cmd2"
|
||||
|
||||
# invoke.Context is just an alias for invoke.context.Context
|
||||
c2 = invoke.context.Context()
|
||||
c2.run("cmd1; cmd2") # $getCommand="cmd1; cmd2"
|
||||
c2.run("cmd1; cmd2") # $ getCommand="cmd1; cmd2"
|
||||
|
||||
|
||||
manual_context()
|
||||
|
||||
|
||||
def foo_helper(c):
|
||||
c.run("cmd1; cmd2") # $getCommand="cmd1; cmd2"
|
||||
c.run("cmd1; cmd2") # $ getCommand="cmd1; cmd2"
|
||||
|
||||
|
||||
# for use with the 'invoke' command-line tool
|
||||
@invoke.task
|
||||
def foo(c):
|
||||
# 'c' is a invoke.context.Context
|
||||
c.run("cmd1; cmd2") # $getCommand="cmd1; cmd2"
|
||||
c.run("cmd1; cmd2") # $ getCommand="cmd1; cmd2"
|
||||
foo_helper(c)
|
||||
|
||||
Reference in New Issue
Block a user