File tree Expand file tree Collapse file tree 2 files changed +1
-11
lines changed
Expand file tree Collapse file tree 2 files changed +1
-11
lines changed Original file line number Diff line number Diff line change @@ -34,7 +34,7 @@ def _get_insert_token(token):
3434 sql_hints = (T .Comment .Multiline .Hint , T .Comment .Single .Hint )
3535 tidx , token = get_next_comment ()
3636 while token :
37- # skipping token remove if token is a SQL hint
37+ # skipping token remove if token is a SQL-Hint. issue262
3838 is_sql_hint = False
3939 if token .ttype in sql_hints :
4040 is_sql_hint = True
Original file line number Diff line number Diff line change @@ -68,19 +68,13 @@ def test_strip_comments_single(self):
6868 sql = '#+ hint\n select * from foo'
6969 res = sqlparse .format (sql , strip_comments = True )
7070 assert res == sql
71-
7271 sql = 'select --+full(u)\n --comment simple'
7372 res = sqlparse .format (sql , strip_comments = True )
7473 assert res == 'select --+full(u)\n '
75-
7674 sql = '#+ hint\n select * from foo\n # comment simple'
7775 res = sqlparse .format (sql , strip_comments = True )
7876 assert res == '#+ hint\n select * from foo\n '
7977
80- # sql = ''
81- # res = sqlparse.format(sql, strip_comments=True)
82- # assert res == ''
83-
8478 def test_strip_comments_invalid_option (self ):
8579 sql = 'select-- foo\n from -- bar\n where'
8680 with pytest .raises (SQLParseError ):
@@ -110,10 +104,6 @@ def test_strip_comments_multi(self):
110104 res = sqlparse .format (sql , strip_comments = True )
111105 assert res == sql
112106
113- sql = ''
114- res = sqlparse .format (sql , strip_comments = True )
115- assert res == ''
116-
117107 def test_strip_comments_preserves_linebreak (self ):
118108 sql = 'select * -- a comment\r \n from foo'
119109 res = sqlparse .format (sql , strip_comments = True )
You can’t perform that action at this time.
0 commit comments