mirror of
https://github.com/github/codeql.git
synced 2025-12-17 01:03:14 +01:00
Python: Remove test with CRLF line endings
These were causing `git` to behave strangely, leaving files that were impossible to reset. In the future we should probably generate these problematic test files on the fly, so that they don't have to exist in the repo, but in the short run, it's easier to just remove them so as to not block other users of the repo.
This commit is contained in:
1
python/ql/test/extractor-tests/line_endings/README.md
Normal file
1
python/ql/test/extractor-tests/line_endings/README.md
Normal file
@@ -0,0 +1 @@
|
||||
The test files in this directory were causing some issues with `git`, due to the use of CRLF line endings. For this reason they have been temporarily removed. You can consult the commit history for when this file was added to see what they looked like.
|
||||
@@ -1,4 +0,0 @@
|
||||
| continuation |
|
||||
| feeds |
|
||||
| string_cr_conversion |
|
||||
| test |
|
||||
@@ -1,4 +0,0 @@
|
||||
import python
|
||||
|
||||
from Module m
|
||||
select m.getName()
|
||||
@@ -1,4 +0,0 @@
|
||||
def foo():
|
||||
pass \
|
||||
\
|
||||
\
|
||||
@@ -1,4 +0,0 @@
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -1 +0,0 @@
|
||||
# this file has CR line endings to test lexer's conversion of them to LF
|
||||
@@ -1,28 +0,0 @@
|
||||
|
||||
# write a frame to the screen.
|
||||
# Interpolate values based on percent
|
||||
def interpolate_frame(screen, pcnt, grid, line):
|
||||
""" Interpolate new values by reading from grid and
|
||||
writing to the screen """
|
||||
# each row interpolates with the one before it
|
||||
for y in range(DISPLAY_HEIGHT-1, 0, -1):
|
||||
for x in range(DISPLAY_WIDTH):
|
||||
mask = MASK[y][x]
|
||||
newval = ((100-pcnt) * grid[y][x] + pcnt * grid[y-1][x] ) / 100.0
|
||||
newval = mask * newval / 100.0
|
||||
if INVERT_DISPLAY:
|
||||
screen.set_pixel(x, DISPLAY_HEIGHT-y-1, int(newval))
|
||||
else:
|
||||
screen.set_pixel(x, y, int(newval))
|
||||
# first row interpolates with the "next" line
|
||||
for x in range(DISPLAY_WIDTH):
|
||||
mask = MASK[y][x]
|
||||
newval = ((100-pcnt) * grid[0][x] + pcnt * line[x]) / 100.0
|
||||
newval = mask * newval / 100.0
|
||||
if INVERT_DISPLAY:
|
||||
screen.set_pixel(x, DISPLAY_HEIGHT-1, int(newval))
|
||||
else:
|
||||
screen.set_pixel(x, 0, int(newval))
|
||||
|
||||
## Setup
|
||||
line = generate_line()
|
||||
Reference in New Issue
Block a user